Home > Default > What is the preferred way to open a new url in a new window/popup?

What is the preferred way to open a new url in a new window/popup?

October 11Hits:1
Advertisement
Hi Guys,
I have an application that requires me to show another URL (Fedex tracking number) once a button is clicked.
what is the preferred way to do it?
Should I open a new browser or a popup?
I would appreciate if you have a code example I can use.
Thanks,
Itay

Answers

hi,
For opening a URL , you could also close previous window and open a new browser.
Follow the steps :
-> make an outbound plug in your window.
-> Add URL of type string as a parameter for your outbound plug.
->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of win from view wont b psbl).
Write the below mentioned code to call a URL  in the OnAction of button :
DATA lo_zexit TYPE REF TO ig_zexit .
lo_zexit =   wd_this->get_zexit_ctr( ).
  lo_zexit->fire_out_window_plg(
    url =   'http://www.google.com'                            " string
here replace ig_zexit with your  ig<applicatin name>.
Other way around is using Code Wizard ( control _ F7).
Write the below code in the onaction of button :
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component  type ref to if_wd_component.
data lo_window         type ref to if_wd_window.lo_api_component  = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
  EXPORTING
    URL            = 'http://www.google.co.in/'
    MODAL          = ABAP_FALSE
    HAS_MENUBAR    = ABAP_TRUE
    IS_RESIZABLE   = ABAP_TRUE
    HAS_SCROLLBARS = ABAP_TRUE
    HAS_STATUSBAR  = ABAP_TRUE
    HAS_TOOLBAR    = ABAP_TRUE
    HAS_LOCATION   = ABAP_TRUE
  RECEIVING
    WINDOW         = lo_window.lo_window->open( ).
You can choose any way whichever suits your requirements.
I hope it helps.
Thanx.

Read other 4 answers

Tags:

Related Articles

  • What is the preferred way to open a new url in a new window/popup?October 11

    Hi Guys, I have an application that requires me to show another URL (Fedex tracking number) once a button is clicked. what is the preferred way to do it? Should I open a new browser or a popup? I would appreciate if you have a code example I can use.

  • Preferred Back up strategy in ECC 6.0, Oracle DB, WindowsNovember 30

    Dear Basis gurus' Customer using separate back up tool for backing up the back up folder.  Is it required to schedule disk back up through DB13 or ask them to copy directly the data files on incremental. Kindly help me Regards JosephHi ! If you use a

  • What's the preferred way to load database properties (url...) in a web app?November 30

    In a simple stand alone app, I would normally use a properties file for the database url, username, and password instead of hardcoding the values. But I am not so sure about web apps. I don't even know where I put a properites file for a servlet to s

  • WiFi Sense Not Very Sensible - Preferring Public Hotspots over Preferred NetworksOctober 11

    When I am out and about WiFi Sense is really good as it automatically connects to public hotspots and I only need to open a browser and press ok, etc. However when at home I have BT and have set up my own WPA network connection but the router also ha

  • DDE communication in windows 10 not workingOctober 11

    Hi everybody, I am experiencing a very big problem in the windows 10 technical preview (build 9841) according DDE communication. We have a large crm application that uses DDE communication for 2 business critical modules. 1. Communicate with MS Word

  • Barton 2500+ on MSI K7N2 Delta-ILSR nForce400October 11

    Got it installed today... When I boot it says "Scanning IDE Drives..." then it flashes "No array is defined" and gives me two options, ctrl+F would do a "FastBuild"... when I do that the screen flashes "No Disk is found.

  • Problem with LDAP configuration in Enterprise ManagerOctober 11

    Hi all, I'm new at Java CAPS. After install some pieces of Java CAPS now I'm trying to install and configure a Sun Java System Directory Server 5.2 in our environment. I've already configured the Repository and the Logical Host to work with the ldap,

  • View creation in SE11October 11

    would anyone please explain how to create views in SE11 with screen shots Thanks in advanceHi sunnype, First you read the below then you can see SE11. Here i explained shortly. View Definition A view describes the layout and behavior of a rectangular

  • How do I uninstall Snow Leopard Server, so that I can revert back to Snow Leopard?October 11

    I was experimenting with the Snow Leopard Server DVD on my MacBook Pro running Snow Leopard.  I started the installation process, expecting that it would not install on the Startup Disk, as I had not booted from the DVD.  To my surprise it installed!

  • Error lunching jar fileOctober 11

    I make a jar file then i lunch that jar with java -jar FileName.jar i have thi error Exception in thread "main" java.util.zip.ZipException: Accesso negato at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.941 s.