Open external URL in event Button.

Hi experts,
I have created a Button in Web Client that call an RFC. Later depending on response, It should open an external URL (e.g http://www.google.es).
I don't know how I can open a new link with abap code in the event.
Anyone knows it?
Thanks.

Hi,
In the code where you defined the button use JS
ls_button-on_client_click = 'javascript:window.open ("http://www.google.es","Google","width=750,height=600,resizable=yes");Google.focus()'.
Rgds,
Shobhit

Similar Messages

  • Open external URL from Homepage Framework

    Hi,
    We are building our new ESS functionality with Homepage Framework and I need to create some links to external URL. I would like them to open in a different window with no portal header at all. They should appear as services listed in the menu area. While this seems easy, I had tried several things with no success.
    First, I created an URL iview in portal content. I marked the option "launch in external window" to Open in a separate window.
    I create a resource that pointed to this Iview, and linked resource with a "java webdynpro" service, service with subarea and subarea with area. The service link is displayed correctly but it is always opened in the portal page, not in a different one.  Have i forgotten any parameter that would make this work?
    A second approach was to create a resource that includes the URL and an associated service, marked as "Direct URL launched in separate window".
    This succeds in calling the URL in a differeny window but it adds some strange parameters at the end. So instead of calling http://www.google.com it calls  something like http://www.google.com?sap-ext-sid=2J*HeTVW7295w3QWBZhQow--
    jQDfzgrDHRt*yZ87GlXsgA--%2Fpcd%3Aportal_content%2Fcom.bshg%2Fpct%2Fhcm%
    2FEURO%2FES%2FESS%2Froles%2Fcom.bshg.hcm.ess-es%2FESS%
    2Fcom.bshg.hcm.infoLinks%2Fsap.com%2Fpcui_gp%7Exssutils%2FXssMenuArea%
    2Fbase&sap-wd-arfc-useSys=SAP_R3_SelfServiceGenerics%3AHR0&sap-wd-
    cltwndid=WID1325147123879&sap-accessibility&sap-locale=es&sap-rtl&sap-
    epcm-guid=validate&sap-wd-renderMode=viewArea&sap-pp-
    consumerBaseURL=http%3A%2F%2Fu3d.bshg.com%3A80&sap-ep-
    version=7.0108.20110207041646.0000&sap-wd-tstamp=1325147150353&sap-
    cssversion=7.11.7.30.0&sap-pp-producerid=com.bshg.BSHG_HCM_EMEA&sap-wd-
    app-namespace=zzzz&sap-cssurl=http%3A%2F%2Fu3d.bshg.com%3A80%2Firj%
    2Fportalapps%2Fcom.sap.portal.design.urdesigndata%2Fthemes%2Fportal%
    2Fcustomer%2Fbsh%2Fur%2Fur_ie6.css%3F7.1.8.0.1&sap-wd-finish-
    rendering=false
    While some pages can ignore those extra parameters, in other cases, this causes a "page not found" error.
    Any ideas on how to solve this problem?
    Many thanks in advance to all.

    Hi Daniel,
    Define Resource: you have to mention all the below details
    1. object name :http:// (url ).
    2.window name: "".
    3.window Property : target="_blank".
    and also check define service:
    service type: Direct url launched in a seperate window.
    And assign resouce to service -
    >
    service to sub area--->
    sub area to area---->
    area to areagroup.
    hope it helps............,
    Thanks,
    cbr.

  • Open external url dynamic link in new tab  (no new window) in Chrome

    Hello,
    We need to navigate to a external link in response to user double-click in a row table.
    We've succesfully created the code to invoking a managed bean as response of double-click user event. For that, we added a clientListener object to the table object, and add the javascript code to queue the actionEvent for launching the backing bean code.
    In backingBean code, we execute code to calculate link url based on several conditions, (e.g: depending on a type object, url is http://server1/data.asp?param=..., or http://anotherserver/miApp/exp.cfm?d=2&p=..., ... and so on)
    Now we have the URL string, we invoke code to open the page in the new tab, but, the new page always is opened as a new window, not as new tab in the current browser.
    We have tried with several code:
    1)
    String script = "window.open('" + sURL + "');
    ExtendedRenderKitService service = Service.getRenderKitService(FacesContext.getCurrentInstance(), ExtendedRenderKitService.class);
    service.addScript(FacesContext.getCurrentInstance(), script);
    2) String script = "OpenNewTab('" + sURL + "');
    ExtendedRenderKitService service = Service.getRenderKitService(FacesContext.getCurrentInstance(), ExtendedRenderKitService.class);
    service.addScript(FacesContext.getCurrentInstance(), script);
    and adding the js function in our scripts:
    function OpenNewTab(url){
    var oFormNewPest = document.createElement('FORM');
    oFormNewPest.method = 'get';
    oFormNewPest.target='_blank';
    oFormNewPest.action = url;
    document.body.appendChild(oFormNewPest);
    oFormNewPest.submit();
    This function works fine in others app we have, but when it's invoked inside ADF app, we get a new window insted a new tab.
    We need to open a new tab, doesn't matter the method used.
    Any ideas?

    Thanks, but I also forget I tried before with
    var oTab = window.open(url,"_blank"); //and "_parent", and "_top"
    and doesn't work: The browser opens a new window, not a new tab.
    The same javascript code works fine outside an ADF application.
    Any other idea (using javascript or ADF backing bean code)?
    Regards.
    Edited by: romoracle on 29-feb-2012 6:39

  • Opening an URL via a button in a new browser window?

    Hello,
    I'm integrating now Oracle Reports in my HTML DB application.
    Everything work well. I have create a launching page with paremeter items and a button that call a branching of type "Branch to Function Returning a URL". This branching construct the Oracle Report URL with parameters as entered in the parameter page.
    The only thing missing is the possibility to open Report output in a different browser window. I don't know how to do it via the Branching specification. Normally, in HTML, I would use target="_new" .
    Thank you
    Jean

    you might want to try having your page submit as normal, doing your parameter manipulation in an after_submit pl/sql process, and popping up the report page from your next htmldb application page. let's say, for example, that you have an update form on page 4 that branches back to a report page 2 in your application. you'd like to use the P4_JOB value submitted from page 4 to pop up a google search for that job and the string "oracle". you could do it like this...
    --create an app-level (or page level) item called POP_ON_LOAD
    --have page 4 submit as normal and branch back to page 2
    --add a pl/sql process that fires when page 4 is submitted.  have that proc set the value of POP_ON_LOAD like so...
    begin
    :POP_ON_LOAD := 'OnLoad="popupURL(''http://www.google.com/search?q=oracle+&P4_JOB.'');"';
    end;
    --enter &POP_ON_LOAD. into the "Page HTML Body Attribute" attribute of the "On Load JavaScript..." region on the page-level attributes page for page 2.
    this way, when POP_ON_LOAD is populated, htmldb will make the onLoad call to popupURL passing in whatever url you set from your after_submit process on page 4. and just remember to clear your POP_ON_LOAD item when you don't want page 2 to pop up those extra windows.
    hope this helps,
    raj

  • Opening a URL from a button within a Web Template

    Hi All,
    I have a requirement to provide report specific help from within a standard web template. Assuming that I had a list of help URLs for each report and an intermediary way to redirect to those URL based upon a unique id such as the reports technical name, is it possible to create a generic button from within a web template that would dynamically create a URL based on the reports technical name? I.e., http://www.example.com/page.html?ZGTRPTNME
    To date I have only used the Action "Command via Command Wizard" from within the parameters of the button Web Item. However, I did notice that a Script Function was provided. Has any used this functionality and is it possible to create a URL with the technical name of the report?

    Rekesh,
    I had a look at the document you linked however what I need to find out is how I can place the technical name (dynamically) within the web template URL (i.e., this needs to work for multiple projects over many reports that all use the same global web template).
    It's actually very easy opening a new window via javascript however finding the varible for the report technical name remains unclear. At present I am looking at command URL's. The only other option is that I use a java script substring command to pull the report technical name from the URL (although this not as clean as using command URL's).
    EDIT: Found this document: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/ef9a6c13f2025be10000000a1553f7/content.htm
    Appears that the command: sapbi_page.GetMainTemplateName(); will give me the technical name of the webtemplate although I'm finding it hard to find the command for getting the technical name of the current report.
    Edited by: Paul Thomson on Feb 18, 2010 4:00 PM

  • Howto open weblink/url via html button in new browser window

    Hallo Apex People!
    I have built a form containing a html button linking to a webpage. Is it possible to open it in a new browser window?
    Tnak you a lot
    Johann

    Johann,
    Try this...
    In the 'Optional URL Redirect' properties of the button, change:
    Target is a: URL
    URL Target: javascript:popupURL('[your webpage');
    (Note: This uses one of the built-in javascript functions, that loads a new window without toolbars.)
    Any good?
    Ant.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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

  • To open an external URL from your application

    Hello All,
    Please guide me in below scenario as I am new to SAP UI5.
    I have created a SHELL application with 5 tabs.
    We have a requirement where on clicking of a tab in the application it should open an external url. I am using "link" element of sap.ui.commons library. On press of link to action function I am using below code to open external url content.
    location.href = "http://google.com";  
    It is opening in the same tab but I have been navigated away from my application.
    As per the requirement external url content should be opened  without navigating away from my application.
    I am attaching the screenshot.
    Thanks
    Ansuman

    Hi Jagadeesh,
    See this code for reference.
    This is my view.
    sap.ui.jsview("demo.view1", {
           /** Specifies the Controller belonging to this View.
           * In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.
           * @memberOf demo.view1
           getControllerName : function() {
                  return "demo.view1";
           /** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.
           * Since the Controller is given to this method, its event handlers can be attached right away.
           * @memberOf demo.view1
           createContent : function(oController) {        
                         var btn1 = new sap.ui.commons.Button({
                               text: "This Is View One."
                         var link = new sap.ui.commons.Link({
                               text: "view3",
                          press : function() {                          
                                $("#frameId").slideDown();                                 
                         var iframe = new sap.ui.core.HTML("frameId",{
                          content : "<iframe src=" + 'http://www.jnvbuxaralumni.com' +" width='100%' height='700px'></iframe>",
                         var ele = [btn1, link, iframe];
                         return ele;         
    This is my controller.
    sap.ui.controller("demo.view1", {
           onAfterRendering: function() {
                  $("#frameId").hide();
    This is my index.html.
    <!DOCTYPE HTML>
    <html>
           <head>
                  <meta http-equiv="X-UA-Compatible" content="IE=edge">
                  <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
                  <script src="resources/sap-ui-core.js"
                               id="sap-ui-bootstrap"
                               data-sap-ui-libs="sap.ui.commons,sap.ui.ux3"
                               data-sap-ui-theme="sap_bluecrystal">
                  </script>
                  <!-- add sap.ui.table,sap.ui.ux3 and/or other libraries to 'data-sap-ui-libs' if required -->
                  <script>
                               sap.ui.localResources("demo");
                               //jQuery.sap.require("sap.ui.core.routing.Router");
                               //jQuery.sap.require("sap.ui.core.routing.HashChanger");
                               var oShell = sap.ui.ux3.Shell("shellId",{
                                      appTitle: "Shell Demo Program",
                                      showLogoutButton: false,
                                      showSearchTool: false,
                                      worksetItems: [
                                             new sap.ui.ux3.NavigationItem("homeId", {
                                                    key: "view1",
                                                    text: "Home"
                                             new sap.ui.ux3.NavigationItem("contactUsId", {
                                                    key: "view2",
                                                    text: "Contact Us"
                                      worksetItemSelected: function(e){
                                             this.removeAllContent();
                                             var selected = e.getParameter("key");
                                             var view = sap.ui.getCore().byId(selected);
                                             //console.log(selected);
                                             if( view == undefined){
                                                    view = new sap.ui.view({
                                                           id: selected,
                                                           viewName: "demo." + selected,
                                                           type: sap.ui.core.mvc.ViewType.JS
                                             this.addContent(view);
                                      content: [
                                                    new sap.ui.view({
                                                           id: "viewId1",
                                                           viewName: "demo.view1",
                                                           type: sap.ui.core.mvc.ViewType.JS
                               oShell.placeAt("content");
                  </script>
           </head>
           <body class="sapUiBody" role="application">
                  <div id="content"></div>
           </body>
    </html>
    Here you can see that on click of the link button i am able to display frame in same tab of shell.
    Let me know if it's helpful.
    Regards
    Dhananjay

  • Opening an external url in the same browser

    Hi all,
    I need to open an external URL (for instance,www.google.com) from my WDA application by 'linktoaction' or 'button' event and this should be happen in the same parent window and not as a external window.
    Please suggest me steps with example codes to perform this.
    Regards,
    Dinesh

    Why use a linktoaction?  Just use a linkToURL.
    [http://help.sap.com/saphelp_nw70/helpdata/EN/49/e8884118aa1709e10000000a155106/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/EN/49/e8884118aa1709e10000000a155106/frameset.htm]
    You can use the target property to control how the link opens. 
    If you must use a button or linkToAction, the you will have to use an Exit Plug:
    [http://help.sap.com/saphelp_nw70/helpdata/EN/45/1bc575ba064574e10000000a114a6b/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/EN/45/1bc575ba064574e10000000a114a6b/frameset.htm]

  • Form field to open a external URL passing  the value typed by user in URL

    I am trying to build a text field with a "Go" button beside it so that when a user types in a value (e.g. a bug number) in this text field, it opens up a external URL (e.g. bugdb URL) with the parameter being passed in the URL. e.g:
    P1_SEARCH (Text field): 464666 (value)
    So when I click on the Go button beside it, I want a URL to open in a new browser with the following URL:
    http://xxxx.oracle.com/pls/edit_info_top?report_title=&rptno=:P1_SEARCH (P1_SEARCH should be replaced at the run time)
    I tried using the branching and javascript:popupURL but I was not able to achieve the above mentioned flow.
    Also, I noticed that when I try to create a button in a region selecting the option "Create a button displayed among this region's items", a javascript:doSubmit is automatically associated with it. Is there any way of changing it to javascript:popupURL?
    Can somebody help me to resolve this issue? Thanks in advance.

    Narayan,
    Please don't post the same question twice. If you don't get an answer, it's OK to "bump" it by replying to your own question. You've already asked this question here:
    issues while invoking external URL
    Sergio

  • Toolbar Button to Open Custom URL for a Business Partner

    Hi All,
    for a CRM 5.2 implementation, I'm trying to open a URL in a new explorer window when on hte BP Account Overview ( Corporate Account ).
    I've created and added the Button, I've created an event, but when I launch the code behind the event to open a new explorer window, this does not work.
    I've tried several alternatives already ( see below ), but can't seem to find a working one.
    Can someone please helpme out ?
    Component BP_HEAD, view BPHEADOverview.
    CALL METHOD navigation->GOTO_PAGE
      EXPORTING
        URL     = 'http://www.sap.com'
       SESSION =
    or
    call method cl_gui_frontend_services=>execute
      exporting
        application = 'iexplore.exe'
      parameter   = 'http://www.sap.com'
      exceptions
        others = 1.
    or
      CALL FUNCTION 'CALL_BROWSER'
        EXPORTING
          URL                          = w_url
        WINDOW_NAME                  = ' '
          NEW_WINDOW                   = 'X'
        BROWSER_TYPE                 =
        CONTEXTSTRING                =
       EXCEPTIONS
         FRONTEND_NOT_SUPPORTED       = 1
         FRONTEND_ERROR               = 2
         PROG_NOT_FOUND               = 3
         NO_BATCH                     = 4
         UNSPECIFIED_ERROR            = 5
         OTHERS                       = 6.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Thanks

    Hi,
    First of all I would advice you to post this question in the new CRM 2007 forum.
    We have created our own button that calls an URL in a separate window. Here is some coding from the method CALLBACK~GET_BUTTONS which may inspirere you:
    CONCATENATE 'javascript:window.open'
                  lv_http
                  '","Print","resizable=yes,height=850,width=700,dependent=yes,status=1");'
             INTO lv_java.
      ls_button-type     = cl_thtmlb_util=>gc_icon_print.
      ls_button-tooltip  = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT_SALES_QUOT/SALESQUOT_PRINT' ).
      ls_button-on_client_click = lv_java.
      ls_button-page_id  = me->component_id.
      ls_button-enabled  = abap_true.
      APPEND ls_button TO rt_buttons.
      CLEAR ls_button.
      ls_button-text     = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT_SALES_QUOT/SORDER_CREATEFOLLOW-UP' )."#EC NOTEXT
      ls_button-tooltip  = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT_SALES_QUOT/SORDER_CREATEFOLLOW-UP' )."#EC NOTEXT
      ls_button-on_click = 'FOLLOWUP'.                          "#EC NOTEXT
      ls_button-page_id  = me->component_id.
      ls_button-enabled  = lv_persistent.
      APPEND ls_button TO rt_buttons.
      CLEAR ls_button.
    /Anders

  • Open modal window with extern URL?

    Hello,
    how can I open a modal window with a external url?
    e.g. I want to open Google, but WD Code should stop and the google window is in front of my portal until it is closed. Then WD code continues.
    WDPortalNavigation.navigateAbsolute(..) can't open a modal window, right? WD Source Code keeps running...
    Can I open a WD-Window with context from a external URL?
    I would be grateful for any help!
    Best regards
    Iris Deuring

    Hi,
    Create an action for a button and write this code in that.
    IWDWindow window =
          wdControllerAPI.getComponent().getWindowManager().createExternalWindow(
            "http://www.google.de",
            "Google - Search for an email address",
            false);
        window.open();
    Hope this help.
    Regards,
    Nagaraju Donikena.

  • Linking to external URL using POST from a button in APEX

    APEX Experts
    Does anyone know how to link to an external URL using POST rather than GET behind an APEX button? I'm pretty sure there must be a javascript call but I'm a real newbie to both APEX and Javascript.
    Also does anyone know why APEX decodes an encoded URL before sending it out and how to stop it?
    Thanks
    Deborah

    I did something similar recently but it was in .NET.
    Hopefully someone else here can help you do with Apex and Oracle. I am new to both.
    To POST instead of GET is not as easy as it sounds.
    What I did was open a new window where I outputted a dynamically created form. I would think that you would do that by using the pl/sql web toolkit to call a procedure and output the form using htp.p. You may also be able to do it with Apex (I think they are built using the same tech).
    Basically, your proc would look something like this:
    htp.p('<html><head>');
    htp.p('</head><body onload="document.FORM.submit();">');
    htp.p('<form name="FORM" method="POST" action="www.UrlToPostTo.com" >');
    htp.p('<input name="PostVar" type="hidden" value="' || MyValueToPost || '">');
    htp.p('</form></body></html>');
    So, it creates a html page with a form. When the page loads, it runs the javascript to submit the form to the other site. You can add in as many post items as you need. I marked them as hidden so that the user only sees a blank page briefly before the form is submitted.
    I am sure there is more to it than that, but it gives the general outline of how to post to another site dynamically. Hopefully someone else can fill in the rest.

  • How can I open a URL from a Custom Button in a second help window?

    I have a custom button, which currently opens a URL in a web
    browser, using a redirect page. How can I change this so that it
    opens in a second help window instead? If I understand some of the
    posts I've read, it is possible by linking the button to a related
    topics function but I've no idea how this is done.
    As usual, your help is most appreciated. Thanks a lot.

    Hi, ecoulyn,
    You need to make a topic file like the one below the target
    of the Jump button.
    The onLoad function on the Body start-tag causes the Related
    Topics command to fire when the topic file is loaded in the topic
    pane. When specifying the file name of the topic to display in the
    secondary window, you must always prepend it with the name of your
    .chm file, followed by "::/". Otherwise, an error message appears
    when the Jump button is clicked.
    Pete

  • ICE is there a way to allow my client to make External URLs open in new tabs?

    Hi.
    I have a set my client's site up with lots of editable regions so they can manage content. Although the InContext editor is great for letting my client link to internal pages, documents and external pages I couldn't find where they would select the external URL to open in a new browser tab. Obviously I can go back in and add the html to their links but is there a way they can set the target?
    Cheers
    David

    The sessionstore.js file only exists while Firefox is closed. During shutdown, Firefox writes out that file based (I think) on recovery.js as of that point. When Firefox starts back up again, it reads sessionstore.js and deletes it. So if Firefox is running, it's normal not to see sessionstore.js. Anyway, sessionstore.js is going to be empty now.
    Shadow Explorer might already have done this for you, but just in case...
    You could try the previous versions feature. This is harder to get to on Windows 8 and 8.1, but I have read about a roundabout way. I can't test this myself, but here's what you do:
    Let's say you have a Windows Explorer window open to your current Firefox profile folder. This is something like (with your username and semi-random profile folder name):
    C:\Users\''username''\AppData\Roaming\Mozilla\Firefox\Profiles\blahblah
    Click in the address bar and change the C: to
    \\localhost\c$
    to yield (with your username and semi-random profile folder name)
    \\localhost\c$\Users\''username''\AppData\Roaming\Mozilla\Firefox\Profiles\blahblah
    Press Enter to reload the folder contents that way.
    Now when you right-click recovery.js, recovery.bak, backup.js or sessionstore.js and choose Properties, there should be a Previous Versions tab. Usually the most recent previous version dates back to the last time Windows created a restore point (e.g., system update or possibly scheduled on a more frequent basis).

Maybe you are looking for

  • Use of LIKE in where clause of select statement for multiple records

    Hi Experts, I have a account number field which is uploaded from a file. Now this account numbers uploaded does not match fully with sap table account numbers but it contains all of the numbers provided in the file mostly in the upright positions. Fo

  • Server tools not working on Snow Leopard

    I just upgraded my home Intel Mac Pro from 10.4 to 10.6, and downloaded the 10.6.4 Server tools from the website (WorkGroup manager, Server Admin, Server monitor, etc.). Our Xserve is 10.6.4 also, so there shouldn't be any incompatibility (like there

  • Why is the install button different?

    HI, recently I uninstalled an app and wanted to reinstall it. When I went to the App Store on my iPhone, that app did not have the 'Free' button which u click to download it, but rather a small button with a picture of acloud on it. What does this me

  • Book delivery times in the UK

    Anyone got experience of book delivery times in the UK? Does it vary by number of images/pages?

  • Abt module pool

    Hi,      can i declare a selection screen in module pool program?      can i use at selection-screen event in module pool program?