Button Redirect to New Tab Window Question

I would like to have a button that when clicked once, redirects the page to a URL in a new tab. The URL is based on a sql query from a dynamic action linked to the button.
Way 1:
I have tried to use redirect_url() in the dynamic action itself.
<pre>
htp.init;
owa_util.redirect_url('http://myurl.com');
</pre>
But it didn't work at all.
So I tried ...
Way 2:
1. In the dynamic action set a page item value to the url. This is Action 1 of the dynamic action.
<pre>
:P33_URL_ITEM := function_that_returns_the_url;
</pre>
2. Submit the page. This is Action 2 of the dynamic action.
3. Action 3 of the dynamic action executes the following JavaScript code:
<pre>
window.location.href="&P33_URL_ITEM.";
</pre>
However, the problem is P33_URL_ITEM is not set the first time (or whenever the session is cleared), so that the button has to be clicked twice in order for the page to be redirected.
Not-important question: Does anyone know how to fix it so that only 1 click is needed?
Way 3:
Use APEX Branch.
Important question: Does anyone know how to make the branch open the URL in a new page?
Thanks

953006 wrote:
I would like to have a button that when clicked once, redirects the page to a URL in a new tab. The URL is based on a sql query from a dynamic action linked to the button.
Way 1:
I have tried to use redirect_url() in the dynamic action itself.
<pre>
htp.init;
owa_util.redirect_url('http://myurl.com');
</pre>
But it didn't work at all.
So I tried ...
Way 2:
1. In the dynamic action set a page item value to the url. This is Action 1 of the dynamic action.
<pre>
:P33_URL_ITEM := function_that_returns_the_url;
</pre>
2. Submit the page. This is Action 2 of the dynamic action.
3. Action 3 of the dynamic action executes the following JavaScript code:
<pre>
window.location.href="&P33_URL_ITEM.";
</pre>
However, the problem is P33_URL_ITEM is not set the first time (or whenever the session is cleared), so that the button has to be clicked twice in order for the page to be redirected.
Not-important question: Does anyone know how to fix it so that only 1 click is needed?
Can't you set the P33_URL_ITEM page item in a on-load pl/sql process? It is difficult to give a precise answer unless I see what you are doing the page.
Way 3:
Use APEX Branch.
Important question: Does anyone know how to make the branch open the URL in a new page?
This thread might help:
Open URL in new window when button pressed

Similar Messages

  • How do I always open email messages as "view message in new tab window"?

    Hi, right now my email displays all my messages in a small top window, and the viewed message in a small bottom window.  Then when this happens if I click the "view message in a new tab window" button on the displayed email, it will get rid of all my messages and just display the main message in a larger window.  I like that.  Problem is I have to click that button for each email that I open, and that can be a hassle when I have to open and read hundreds of email messages.
    Is there any way I can set the default settings of the email to always open email, by default, as "view message in a new tab window"?

    Ok, I looked through the help files and found that if I double click on a message in the main email window (and also click the upper left and upper right arrows to close those windows in the email folder), I almost get to read that entire message in a full window.  That's a lot better to know that.

  • URL Hyperlinks in Acrobat (and InDesign) open in new Tab/Window

    I really don't understand, why this feature isn't  implemented yet. I tried to google a workaround and found hundreds of posts auround this problem. People where asking how they could do this since 2002 (the oldest post I could find) maybe earlier.
    Please make sure Acrobat - and also InDesign - get this feature in the next version - because people want to have it!!!
    What do I talk about?
    The following feature:
    I include a textlink or and Image-link into a PDF-File.
    Because of the Standard Browser settings most of the people who download a PDF-File will see the PDF in a Browser Tab. Now, if they hit one of the links (included in the PDF) the link opens in the same window/Tab. The PDF is closed. The only way to get back to the PDF is to hit the return button of the browser or reload the PDF. Normally I would like to open these links in a new Tab or Window. But there is no function nor in Acrobat, neither in InDesign to make the Link open in a new TAB/Window.
    I know there was a possibillity  using JavaScript (app.launchURL("http://www.MySampleURL.com/someFolder/somePage.html", true);)
    and this worked. But now because of the security settings of Acrobat X and later it only works if the user changes the settings. So, it's no longer useful because most of the users won't know how to make the links work.
    So at the moment there is NO WAY to make the link open in a new Tab.
    I know If I link another file, it askes me where to open - new window or the same. Why can't you implement it for URL's too?
    Sorry, I searched the whole day to solve this problem. And I can't understand, why Adobe doesn't look at there customers needs (since 2002 or earlier).

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Previously, my new tab window would display all my favourite sites. My wife downloaded a program and now the new tab window is the Ask website.

    I removed Mozilla and reloaded from your website but the Ask website still opens in the new tab window
    I would like to have my favourite websites in the new tab window as they were previously.
    Regards
    Peter

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can open the <b>about:config</b> page via the location/address bar and search for prefs that refer to <b>ask.com</b>.
    You can reset user set (bold) prefs via the right-click context menu to the default value.
    If you do not keep changes after a restart or otherwise have problems with preferences, see:
    *http://kb.mozillazine.org/Preferences_not_saved

  • Why are there only 2 tiles on my new tab window, there were 9?

    There doesn't seem to be any options to add additional tiles to the new tab window and when I drag a bookmarked site to the window, it does not stay there, it just opens the site

    Hello,
    With the latest Firefox update, the number of tiles is now determined on screen size - if you zoom out or expand the window you can have more tiles appear.
    If you want to set a fixed number of tiles, I believe you can do so with the following extension:
    * https://addons.mozilla.org/en-US/firefox/addon/new-tab-tools/
    You can also see '''jscher2000''''s Chosen Solution here: https://support.mozilla.org/en-US/questions/1025414
    It requires the [https://addons.mozilla.org/firefox/addon/stylish/ Stylish] add-on but will automatically shrink the tiles on the page:
    * https://userstyles.org/styles/106326/shrink-new-tab-thumbnails

  • Opening file in a new tab/window

    Hi,
    I have a form (HTML added through a widget) and a number of images on one page. I want each image to be a link to a file, where the images will be seen full quality. however, doing this takes visitors away from the page instead of opening a new tab/window - then clicking back means that the form data is lost - i.e. tickboxes are no longer ticked, etc.
    I cannot use the photo viewing page included in iWeb, as the pictures will then overlap with my form because the enlarged images are loaded on the same page.
    I hope this makes sense, and if anyone could help with opening files in new tab/window it would be great, or a way of opening a photo viewing platform in a separate tab/window directly from a click of one of the photos. I have seen other sites - http://www.aroundthebusch.com/Folio/London%20to%20Istanbul.html
    (this is not mine) where the photo viewing "platform" is IDEAL. I would love something just like this if someone could advise.
    i do not want the photos to link to an external page (which can be opened in a new window) as it would mean me creating separate pages for each picture, and linking them all... no way!
    Also, it would obviously be preferable to be quick to set up, but also to change. I would need to have multiple pages of many photos, each with the viewing facilities so it could not take a long time to set up. I may also need to add/delete some photos, so if all the linking work was done automatically it would be fantastic.
    Any help much appreciated,
    Thanks in advance, James

    If you open it in javascript and specify a height/width or location it should open in a new window.
    window.open("http://www.adobe.com", "_blank", "toolbar=yes, scrollbars=yes, resizable=yes, top=500, left=500, width=400, height=400");

  • Toolbar bookmarks don't create new tab/window although is marked in preferences to do so.

    Even though I have the box "Open new windows in a new tab instead" checked, when I click on one of the links in my Bookmarks Toolbar, it doesn't open in a new tab window. I clicked several bookmarks from the toolbar and it happens on all of them.
    Also, when I click on different links from different AppleMails, it DOES open a new tab/window.
    How can I get the links in my toolbar to recognize the preference chosen to make a new tab/window?

    The setting in Tools > Options > Tabs: "New pages should be opened in": "a new tab/window" is for links that specify a target window to open the link.<br />
    That option allows to divert such links to a new tab instead of a new window.
    For links that do not specify a target use a middle-click or hold down Ctrl and left-click the link or use the right-click context menu to open the link in a new tab or window.

  • Open link in new tab/window problem

    I have the following problem: I have a menu with h:commandLinks and I use faces.config configurations for my navigation. When I choose to open a menu entry in a new window or a new page the old page is displayed and I have to click again on the menu entry in order to navigate to the new page.
    Does anyone know what is causing this? How could I make it work so that the user gets the content of the desired page in the new tab/window?
    Thanks

    Hi,
    sorry for the late response. I have h:messages on the page and I don't get any errors. I try to open the link so: right click on the link and then I choose "Open Link in New Tab" or "Open Link in New Window".
    If I simply click on the link everything works fine and the new page is displayed but when I use the right click menu the same page is displayed and I have to click again to obtain the desired page.
    thanks

  • Tip Message with hyperlink to open in new tab/window

    Hi Guys,
    I have created a FND Message which has the following content:
    some text <a href="https://www.google.co.uk"target="_blank">Click Here</a> some more text
    This is referenced in a custom OAF page as a Tip Message (OATipBean), the text and hyperlink render with no issues, however the hyperlink does not open in a new tab/window (it opens in the current tab) - when you view the source of the page the '...target="blank"...' is not there:
    ... <a href="https://www.google.co.uk">Click Here</a> ...
    Is there a way of getting hyperlinks in Messages to open in new tabs/windows?
    Regards
    Carl
    Message was edited by: CarlHammond

    I think part of your problem might lie in the way you are trying to use your quotation marks.  It appears you are trying to have the single quotes do what double quotes should be doing.
    document.write("<a href='"+imagelinks[ry]+"' target='_blank'><img src='"+myimages[ry]+"' border='none'></a>
    If you want to have doublequotes appear in code as doublequote characters you can try slashing them to have them read literally... \"
    document.write("<a href=\""+imagelinks[ry]+"\" target=\"_blank\"><img src=\""+myimages[ry]+"\" border=\"none\"></a>

  • Disable New Tab Window Feature

    I do not like nor want to use the New-Tab Window feature.
    How can I *permanently* disable this feature?
    A 'config' page change maybe?

    Firefox 13+ versions have an about:newtab page that shows the thumbnails of recent visited websites.
    see:
    *https://support.mozilla.org/kb/new-tab-page-show-hide-and-customize-top-sites

  • Hello! Help me please, I have a problem with the program occurred after the upgrade to version 3. 6. 16, namely by pressing the button 'Open a new tab' nothing happens. ?

    Hello! Help me please, I have a problem with the program occurred after the upgrade to version 3. 6. 16, namely by pressing the button 'Open a new tab' nothing happens. ?

    This issue can be caused by the Ask<i></i>.com toolbar (Tools > Add-ons > Extensions)
    See:
    * [[Troubleshooting extensions and themes]]

  • AS3 rollover buttons-opening new tab/window?

    I admit to being in WAY over my head here, but it seems like there should be an easy fix (yeah, right!)
    Here is my URL: http://www.rebeccadodelin.com/
    I used AS3 to create my buttons, but when I click on them they open up new tabs or windows and I want then to just stay in the same tab. I got this AS for the buttons from a Flash workshop I took over the summer and I've tried a couple things I found online to change the target for the buttons, but I just got a bunch of errors. So now I'm kind of "afraid" of my AS :-(
    Can anyone help me?
    Thanks so much!
    Rebecca

    If you look up the navigateToURL function in the Flash documentation, it inlcudes all of the target options you have.  You want to use the "_self" option.

  • Hyperlink/button always opens in new tab/window

    Hello everyone,
    is there any way to change this ? I have a swf based menu with links to current site, but it always opens a new tab.
    Also, can i choose where to apply "interactive page curl" or it must be applied to all pages ?
    Thanks

    Defining a hyperlink (in Indesign) for an exported swf file to open an URL in the same browser window is not possible. And I think you are out of luck for page curl on certain pages, I think it will apply to all pages. These two scenarios would require working in Flash.

  • Can the Intellipoint mouse center scroll button open a new tab?

    I have a Microsoft Wheel Mouse optical USB mouse with a scroll wheel which can be modified from within the System Preferences settings. The Wheel Button however has a limited number of options. Different from Windows, this mouse, in the Mac, does not have the option to set the wheel button to open a new tab. Perhaps I can't figure it out from the options available, but is there a way to force it to open a new tab, like in Windows?
    Thank you.
    Roxy

    My apologies for my late reply to your very helpful response.
    However, my question probably was not well made. What I meant was to click on a link with the wheel button and open the link in a new tab.
    What assigning command-t does is open a new tab. Not what I meant.
    Sorry about the confusion and I hope you do have a suggestion.
    Thank you very much.
    Roxy

  • In v4 why did you flip the context menu for open in new tab/window. Sucks when you are used to the other way

    I downgraded to 3.x because when I browse I have many new open windows (I have been using FF for so long I automatically select the second option). Seems stupid to change the order of the context menu when it has been the other way forever.
    Please change it back or at least have the order as an option.

    So the answer from TonyE was "That was an intentional change to promote the use of tabbed browsing." (See http://support.mozilla.com/en-US/questions/791244)
    And there is an option to use a menu editor to put them back detailed in that thread as well. The problem, of course, is that you need to perform a complex customization to every computer on which you use Firefox in order to fix a problem that should never have been created, never made it through beta, and that the developers won't fix because they believe that they are right.
    Frankly, eventually you get used to it. But in the mean time, they have annoyed, and in many cases pissed-off a large segment of their users for no reason at all.

Maybe you are looking for