when click button code require to open output on new tab - oracle

i am using apex 18.1 with database 11g in windows, my page has dynamic action, with following Executre java script;
apex.navigation.redirect('localhost:1234/reports/rwservlet? server=servername.&report=myrep.rdf&userid=user/pwd#link&desformat=pdf&destype=cache&paramform=no');
it works fine when Button press but output (.pdf) opens in same browser tab and i do want it to open in new tab;
please assist.

Instead of apex.navigation.redirect(...), try window.open('...','_blank')

Related

Display modal on login screen of Credential Provider

I want to display modal after clicking the logon button like the screen below.
I'm trying to communicate with a server with a timer in modal, is it possible?
Thanks in advance.
Yes it is possible
To show a pop-up like that,
make a simple standalone C# form program (.exe) to handle that Modal.
Later I put the exe file somewhere else inside the pc.
Later I use system((string)L"path-to-exe-file") command to run that exe file

Oracle Forms: Printing Without Dialog Box

Our application runs on oracle 10g. When we want to print a report after filling the oracle form fields we do the following process:
1. save the file (when it is saved it opens in a new tab)
2. hit control+p (print preview is shown)
3. hit enter (command goes to printer)
Now we want to directly send command to the printer so that the print preview is not shown at all.
You can accomplish this by using the ORARRP utility. Unfortunately, you must have access to Oracle Support to view this support document.
Note that the bottom of the support document specifies a change to orarrp.ini to prevent the print preview from showing.
https://support.oracle.com/rs?type=doc&id=277431.1

How to open mutiple tabs within a browser using Capybara?

I need to open multiple tabs within a single browser and i need switch over all the tabs.
Give me your suggestions. Thanks in advance.
I'm not so strong in capybara. so, i'm giving solution to switch over between tabs using selenium.
For a instance you clicks a button in a web page and it will open a new page.
The new page may open in a new tab in the same browser window or in a new browser window. That is not controlled by selenium. It will control by the browser which you using.
For a instance take firefox, goto tools->ptions-> tabs-> open new windows in a new tab instead check the option. For example, if you clicks a button it will opens a page only in the new tab of a same browser window. For a sake if you unchecked mean it will open a page in the new browser window. Likewise every browser has its own settings.
Try this code:
new Actions(driver)
.sendKeys(driver.findElement(By.tagName("html")), Keys.CONTROL)
.sendKeys(driver.findElement(By.tagName("html")), Keys.NUMPAD2)
.build().perform();
In above Keys.NUMPAD2 refers that you are gonna move to the second tab in the session.
You can move to Third, Fourth, etc... by giving NUMPAD3, NUMPAD4, etc... respectively. Here i am using windows OS, if you are in some other OS use their shortcuts.
I hope this will help you.
You can use this exact function in Ruby:
page.driver.browser.switch_to.window(page.driver.browser.window_handles.last)

Spring, petclinic, Do you want to save this file, or find a program online to open it?

I downloaded the spring mvc petclinic, when I run it, and clicked in the link :
Display all vitiranians
I got a pop up dilog box saying :
Do you want to save this file, or find a program online to open it ?
in the controller that link is defined like this :
#RequestMapping("/vets")
public ModelMap vetsHandler() {
Vets vets = new Vets();
vets.getVetList().addAll(this.clinic.getVets());
return new ModelMap(vets);
}
My question is :
why it does not dsplay vitiranians and just propmpt me withat dialog box ?
any idea or help will be appreciated.
thanks
The application to be used to open a content of a certain type can be customized in some browsers (I know only for Mozilla and Opera):
Mozilla Firefox users
Open Mozilla Firefox
Click Tools and then Options
Within the Options window click Applications
Select the Content Type you wish to adjust. For example, if you want
to change how a .PDF file opens in Firefox, select Adobe Acrobat Document.
In the Action section, change the action to how you wish to open the
file. If you want to download .PDF files instead of opening them,
select Save file.
Opera users
Open Opera
Click Tools and then Preferences
In the Advanced tab click Downloads
Locate and highlight the file extension you wish to adjust. For
example, pdf (or application/pdf). Tip: You can sort these columns.
Once highlighted, click the Edit button.
Within the file type window, specify how you wish for the file to be
handled.

Open link in same browser tab

How do I open a link in the same browser tab? I tried this code:
ShellExecute(Handle, 'open', 'http://site.com', '_self', nil, SW_SHOWNORMAL);
But it continues to open the link in a new table.
Thanks.
I've written on this topic before:
ShellExecute has absolutely no notion of "tab." In fact, it doesn't
even have a notion of "default browser." All it does is find whatever
program is configured for file names that start with "http://" and
execute the configured command line.
What the browser does with the new command line is its own choice.
The API function has no control. Sometimes, the browser allows the
user to configure it.
Opening a new tab or window is the safest thing to do. Neither you
nor the browser knows whether the user is still using the previous
tab or window.
A possible entry point is using OLE Automation. Using this technique you can connect with any existing instance of MSIE, so that you can bring the current browsing window to a new url.

Resources