Opening a url in a new window

Guys,
I have a situation to open a url (url is formed dynamically) in a new window on the click of a button (command button).
I tried to use Go button, but in go button there is no way to provide the url dynamically. I mean i form the url by reading the contents of the page. But go button doesnt allow to form the URL dynamically.
The problem with command button is, it doesnt open the URL in a new window.
My requirement is
i click on the button on a page -> go to method (read the contents of the page) to form the URL -> open the URL in a new window
How this can be acheived.

Yes, but i need a method to do my calculation to build the dynamic URL.
I have resolved it using command button
public void actionlistener(actionevent event)
String dynamicUrl = // logic to build url;
FacesContext ctx = FacesContext.getCurrentInstance();
ExtendedRenderKitService erks =
Service.getService(ctx.getRenderKit(), ExtendedRenderKitService.class);
String url = "window.open('" + dynamicUrl + "','_blank');";
erks.addScript(FacesContext.getCurrentInstance(),url);
this resolved my issue

Similar Messages

  • Captivate 7 Click box and bottons not able to open an URL on a new window

    I inserted a button and a click box in CP7 to open an URL on a new window. The URL opens but in a New Tab. There is an issue that the URL cannot be opened on a NEW WINDOW, I am using IE and Chrome. Do you have any ideas about this issue and how to troubleshoot it? I tried with Safari and it works fine.
    Thanks, Jorge - Adobe Captivate 7 user.

    Hi Jorge
    It's my understanding that all you can do is to configure the link to open in a new "whatever". Whether you get the link opening in a tab or a window is left up to the browser and how the particular user has their browser configured. For example, I use Firefox and when I look at its settings here is what I see.
    I'm guessing there must be a way to force a new window, because I do see new windows appear. But I think in those cases folks are doing it by using JavaScript.
    Cheers... Rick

  • Open a URL in a new window from Flash

    Looking for the simplest way to open a URL in a new window from Flash using AS3-CS3, Thank you.

    The following line of code will do that...fill in the URL
    navigateToURL(new URLREquest("http://www....", "_blank"));

  • Opening a URL/File in new window instead of new tab

    I think I know the answer to this, but I'd like to check anyway.  When setting an action to Open URL or File for a button/click box/hyperlink/etc, is there a setting in Captivate to open the URL/File in a new WINDOW instead of a new TAB? I know to use the "New" setting along with the Open URL or File action. I assume opening in a new window instead of a new tab by default is going to depend on the settings of whatever browser you use, but like I said, just wanted to check. Thanks!

    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");

  • Openning an URL in a new window when the page is submitted, from a pl/sql p

    Hi,
    What I want to do is a procedure (called by an apex process) that opens a new window browser at the URL defined in the procedure.
    I have tried with the following procedure:
    create or replace procedure reportes (par1 NUMBER, par2 NUMBER)
    BEGIN
    htp.htmlOpen;
    htp.headOpen;
    htp.title('Reporte SAF - .: SINERWARE - 2008:.');
    htp.headClose;
    htp.bodyOpen;
    htp.area('0,0,200,400', 'rect', '200.31.86.173/Orden_pedido.jsp?centro_costo='||par1||'&orden_inicial='||par2, NULL, '_blank');
    htp.bodyClose;
    htp.htmlClose;
    END;
    Thanks for any comment.
    Alejandro T.

    I assume your are writting an applet. You can do this by adding a little Javascript to your HTML page. Add this to the HEAD section:
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
      function openURL(url) {
        window.open( url, "", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes" );
      } //end openURL
    // End -->
    </SCRIPT>Execute the Javascript using showDocument():
    String url = "http://somewhere.com/" ;
    try {
      getAppletContext().showDocument((new URL("javascript:openURL(\"" + url +"\")"));
    } catch (MalformedURLException me) {
    } //end try

  • Dragging an existing tab to the desktop (or below tab bar) does not open that URL in a new window, only a new window with an empty tab. FF4 RC2 (did it with RC1 as well).

    When I drag an existing open tab from the FF4 tab bar onto my desktop, a new window opens as expected but the tab within that window does not load the URL of the tab dragged from the previous window. The tab menu item "Move to New Window" does the same thing as well.
    I have disabled Tab Mix Plus add-on but it has made no difference. Is there a setting somewhere that I am missing?

    I use Tab Mix Plus and do not have that problem.
    <br/>
    You may need to try Firefox Safe Mode to see if an add-on is causing the problem; see: http://kb.mozillazine.org/Safe_Mode
    *<u>In Firefox 4, to enter Safe Mode, hold the Shift key while clicking on the Firefox 4 desktop icon.</u>
    *Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes '''<u>before</u>''' starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    * If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling '''<u>one at a time</u>''' until the problem reappears. '''<u>You MUST close and restart Firefox after EACH change</u>''' via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.
    * See the following for more information
    ** http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes
    ** http://support.mozilla.com/en-US/kb/Troubleshooting+plugins
    ** http://support.mozilla.com/en-US/kb/Basic+Troubleshooting

  • Why can I not open a URL in a new window

    In older versions of Firefox I could right click on a URL and then select "Open Link in new Window" and a new window would open to display the information. In newer versions, V5 or later, if I select "Open Link in New Tab" the new information will be displayed in a new tab, if I click on "Open Link in New Window" all I get is a new window with two blue bars across the top a "New Tab" and an empty window, no information is displayed.

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4/5/6/7 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    If it is good in the Firefox SafeMode, your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • How to open the URL in a new window

    Hi,
    i have created a web template with hyperlinks in it. when i click the link in the browser it opens it in the same window.
    how can i open the link in a new browser. we are in BW 3.5
    Thanks
    Krishna

    Try adding this to your URL at the end:
    target=_blank
    Hope this helps...

  • Open a url in a new window in the backing bean

    Hi to all
    How can i open a website like google in a new window, but via Backing Bean??
    thanks to everyone in advance.

    use javascript..
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExtendedRenderKitService service =
    (ExtendedRenderKitService)Service.getRenderKitService(facesContext,
    ExtendedRenderKitService.class);
    service.addScript(facesContext, "window.open(http://www.google.coml)");

  • Open external URL in a new window

    I have a button to show information from another site but i would like to show this info in a new window
    www.octa.info
    click on (vergoedingen zorgverzekeringen)
    David

    You'll have to modify the corresponding HTML file on your .Mac disk and change the anker-tag. This change must be made after every update of your site...
    Just have a look at
    http://discussions.apple.com/thread.jspa?threadID=339861
    Bye, Matthias

  • How to open the url link in new window or new tab in Sharepoint

    Hello,
        Am having one custom list and one column name  contains type (Hyperlink & picture).I want to open this in a new tab on click I tried but i didn't get any solution even I follow this link also.
    https://wb2-web.sharepoint.com/blog/Lists/Posts/Post.aspx?ID=9 
    and I didn't get this line of code:     <a
    onfocus="OnLink(this)" href="{$url}" >  
    Any Help

    You can do it one of two ways:
    1. Insert some CSS that will change the target to "_new".
    2. Change the field that the user enters information in to a single line of text, then create a calculated column that is:
    =CONCATENATE("<a href=",[URL Field]." target=new>Click here</a>")
    Format that as a number.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • Open URL in a new window

    I have a project slide with buttons that open a URL that points to the .htm project file for another project in a new window with the current project to stay running.  This causes the course to close completely in the LMS?

    Hi,
    try setting the button to open the url in a new window, that way the students will not have to "start over" when they need to go back to the module.
    Just go into your button properties and next to your url, click the down arrow and select new.  This will open the url in a new window.  You can uncheck the continue playing move choice also to stop the movie so it doesnt continue to play when the user is visiting the webpage.

  • Url extern in new window

    hello
    I set the url in backing bean with this code:
    FacesContext faces = FacesContext.getCurrentInstance();
    ExternalContext context =faces.getExternalContext();
    HttpSession session = (HttpSession)context.getSession(false);
    context.redirect(miurl);
    faces.responseComplete();
    the problem is that i want open the url in a new window pop-up.
    The url isn´t a page for my app, is url extern for example google.com
    Thank and sorry for my poor english

    Hi,
    if want to open the page with a simple link, you can do something like that:
    <af:goLink text="goLink 1" targetFrame="_blank"
    destination="http://google.com"/>
    Claus

  • Open URL in a new window by closing the parent window

    Hi Friends,
    Is there any option to open URL in a new window by closing the parent window on a button click?
    Already implemented the logics suggested in /people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications , the thread ' URL in same window '  and the standard component WDR_TEST_EXIT_PLUG .But button is not triggerring any actions .plz help me  ..............
    Regards,
    Radhika

    hi,
    Do the following steps :
    -> Make an Outbound Plug to the Window.
    ->Make the type of Outbound plug to Exit Type.
    ->Add URL of type String as a parameter to the outbound plug of Window.
    ->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont b possible ).
    To open a new URL with closing the previous one write this Code in OnAction of Button : ( this Code can be get from Code Wizard too ).
    DATA lo_zexit TYPE REF TO ig_zexit .   <zexit is name of my Component>
    lo_zexit =   wd_this->get_zexit_ctr( ).
      lo_zexit->fire_out_window_plg(
        url =   'http://www.google.com'                            " string
    I hope it helps.
    Thanx.

  • Opening a URL in a new browser window

    Hello Experts,
    I am trying to open a dynamic url in a new browser window from a Portal application (travel and expenses). Basically, when a user clicks on the submit button, Badi IF_EX_TRIP_WEB_CHECK~USER_CHECK_CHANGES is called. In the BaDI, we have added code to concatenate a parameter to a url and then open a new browser window with that url. This works perfectly in r/3 using a tcode (pr_web_1200) but when I use the portal application under ESS, the window does not open and no error message is issued. We are using METHOD cl_gui_html_viewer->detach_url_in_browser. Any idea why this is not working through ESS in Portal? Is there some other method that we need to use? Any help is appreciated.
    Regards,
    Sal

    check....
    Re: Open Portal Transaction iView in new window *without* Browser window
    for iView (page) you probably set the property 'Launch in New Window' to value Display in Separate Window. To tune up the other otions you have the possibility to set the property Window Features, value should contain toolbar=no. These features will be used when Javascript opens up your window - you can apply any option coomonly documented. IMHO for your demands the best option is fullscreen=yes,toolbar=no - you get really the maximum possible size.

Maybe you are looking for

  • Idvd wont let me write dural layer dvd's?? Plz help

    Im just finished my project from idvd it is a big slide show/ videos of my Great uncle that has recently passed away. The Project is 7 gig's I have a entry level macbook with out a super drive. I bought a lacie dvd burner and when i attach it to my c

  • Connect by prior in disco

    Hi I have a table in Oracle which is a recursive (pigs ear) hierarchy. I want to be able to use this in disco and "wander" down the hierarchies using connect by prior and start with. Can this be done?

  • WDA and Web Services

    I have a Web Service (WSDL URL) that I would like to consume so that I can retrieve data to be displayed in my Web Dynpro application.  Can I access a Web Service using Web Dynpro for ABAP or must I use Web Dynpro for Java?  Please point me to any do

  • Color laserjet 2605 DN

    I am running Windows 7 (64) and have a CLJ 2605 DN printer. I can not get the printer to print in color. I have tried via usb and over the network. I tried the HP universal printing PCL 5 driver from the website, with no luck. I also allowed windows

  • Migrate tracking information

    Ouch! I can find none of the tracking data for files I had sent previously via "SendNow" (and before you forced me over to "Send". Adobe, where is this tracking data?