How to close the browser on button click?

Hi,
On a HTML page, I have a button labeled as "Close". When user click the button, I want to close the browser. I am using Apex 4 with 10g.
I created the following process which I call on pressing the close button:
BEGIN
htp.p('<body>');
htp.p('<script type="text/javascript">');
--htp.p('window.opener.doSubmit();');
htp.p('window.close();');
htp.p('</script>');
htp.p('</body>');
END;But it shows the below in the browser instead of closing it.
Location: f?p=17638:9:3591448756041585::NO
Any wayout?
Thx

For popup windows I use button code / javascript such as this.
The self function refere to the correct window, while window.close my be connected to the wrong (parent) window.
input type="button" value="Cancel" onclick="self.close();"  id="CANCEL"Edited by: Sven W. on May 26, 2011 2:46 PM

Similar Messages

  • How to close the detach popup on click of a button in the panel collection

    Hi,
    I'm using Jdeveloper 11.1.2.3.0.
    I have an af table surrounded by panel collection. There is a button on panel collection to commit the changes in the table.
    Clicked detach button to view the table in full browser.
    On click of Commit button, the detach popup is not closed. I have set partialSubmit of that button to false. Then also detach popup is not closed.
    Can anybody suggest me how to close the detach popup on click of a button in the toolbar.
    Thanks,
    Vinod

    Hi Frank,
    Thanks for your response. Popup is not closed.
    I tried this approach, when the view tree is navigated on the Detach, I see that the tree is same as if it is traversed on the page without detach.
    Printed client id and UI component class in the while loop, result is as below.
    r1:0:pc1:t3 class oracle.adf.view.rich.component.rich.layout.RichToolbar
    r1:0:pc1 class oracle.adf.view.rich.component.rich.output.RichPanelCollection
    r1:0:ph2 class oracle.adf.view.rich.component.rich.layout.RichPanelHeader
    r1:0:pgl1 class oracle.adf.view.rich.component.rich.layout.RichPanelGroupLayout
    r1 class oracle.adf.view.rich.component.rich.fragment.RichRegion
    pgl1 class oracle.adf.view.rich.component.rich.layout.RichPanelGroupLayout
    db2 class oracle.adf.view.rich.component.rich.layout.RichDecorativeBox
    db1 class oracle.adf.view.rich.component.rich.layout.RichDecorativeBox
    psl1 class oracle.adf.view.rich.component.rich.layout.RichPanelStretchLayout
    ps1 class oracle.adf.view.rich.component.rich.layout.RichPanelSplitter
    f1 class oracle.adf.view.rich.component.rich.RichForm
    Tried with setting partialsubmit property to false on the command button, still the popup is not closed and my Faces Message are shown behind the detach popup.
    Thanks,
    Vinod

  • How to close the browser from an Applet?

    Hi,
    I've written one applet, with 2 buttons (Continue & Exit). On click of Continue button, it will open another web page. On click of Exit button, the browser should be closed.
    I'm not able to close the browser from the applet.
    Can any body help me.
    Rgds
    Santosh

    In my experience, calling Javascript from applets is flaky at best. However, I have gotten it to work in some cases. The following code should get you started:
    netscape.javascript.JSObject win = netscape.javascript.JSObject.getWindow(applet);
    Now you can call different methods on the win object (look into Javascript documentation for details).
    It also depends on if you are using the Java Plug-in or the JVM built into the web browser. You probably need set MAYSCRIPT=TRUE in your HTML. Look into the Java Plug-in documentation for details...

  • How to close the browser from webdynpro application

    Hi All,
    I need  to implement the closing the browser where the webdynpro  application running by click on some button in that application.
    Can any body tell me how to implement that.
    Regards
    Vijay

    Hi,
    I resolved as follows(WebDynpro7.3) :
    1.- Create a plug in the "Window" with the name "Exit" and parameter "closeWindow" the type Boolean, after edit it and put type Exit.
    2.-Repeat the same but in the "Interface".
    3.-Place the following code in the action:
      IWDWindowController iwdWindowController =wdControllerAPI.getWindowController();
      IWDWindowInfo windowInfo=iwdWindowController.getWindowInfo();
      IWDOutboundPlugInfo  iwdOutboundPlugInfo=windowInfo.findInOutboundPlugs("Exit");
      iwdWindowController.firePlug(iwdOutboundPlugInfo, new HashMap(){{put("closeWindow",true);}});
    regards.
    JCARMONA

  • Close the Window on Button Click.

    please can someone help.
    I am trying to close the window in which my 'Exit'button is defined.
    For this I am using:
    button.addActionListener(this);
    public void actionPerformed(ActionEvent e) {
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
         //dispose();
    But the window still doesnt close,till I click on the 'X' icon.

    action{
    if(e.getSource() == myButton){
    jframe.setVisible(false)
    // possibly jframe.dispose() depending on what you are trying to do
    //if you are tying to exit the program all together
    System.exit(0);
    }http://mindprod.com/jgloss/close.html
    xpost
    http://forum.java.sun.com/thread.jspa?threadID=764106&tstart=0

  • Close the Browser which clicking Logoff Button

    Hi,
         I have requirement like this,
                                      I have button Logoff. While clicking this button my webdynpro application must close i.e
    it must close the browser.
    I am using the following code 
    "com.sap.tc.webdynpro.services.sal.um.api.WDClientUser.forceLogoffClientUser("");".
    But this code moves  to some other screen and gives message "Webdtnpro applicaation is closed,bye".
    Please help with the code and procedure to handle the Logoff.
    Thanks,
    Anitha.

    Hi,
    The following steps describe how to terminate the application using an exit plug with a parameter defined for the URL. This procedure is recommended by SAP, because after the termination of a Web Dynpro application the user is not logged off when executing a Web Dynpro application on the NetWeaver Portal.
           1.      Define an exit plug in an interface view of your local component interface which is displayed in the Web Dynpro Explorer view. Either use the default interface view, or create a new one. Open the Controller Editor with its plugs, and create an exit plug within the outbound plug table (via New).
           2.      Follow the wizard, and enter the name Url for the parameter and select string as the type. This parameter is case-sensitive and must be entered exactly this way.
           3.      Go to your view, define an action with name Exit and use the default event handler named onActionExit().
           4.      In the view layout, define a button and bind its onAction event to the Exit action. To do so, start the View Designer on the view unit (Open ® Open View Editor, choose Layout tab).
           5.      Display Properties for the current view unit, and define usage of the Component Controller of your WD Component.
           6.      Switch to the view controller coding: Choose tab Methods, then press F3 on method name to start the editor with the implementation (.java file). Add the following method coding:
    //@@begin onActionExit(ServerEvent)
      String logoffURL = wdComponentAPI.getApplication().getApplicationInfo().findInApplicationProperties("sap.logoffURL").getValue();
    wdThis.wdGetTimeCompInterfaceViewController().wdFirePlugExit(logoffURL);
    //@@end
    Or
    Follow this procedure,
    create a button and create an action exit.
    in exit method write the following code
    public void onActionexit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionexit(ServerEvent)
    com.sap.tc.webdynpro.services.sal.um.api.WDClientUser.forceLogoffClientUser(null);
    //@@end
    Refer these threads also,
    Regards,
    sunaina Reddy T

  • When I click on a link, tabs open continuously and rapidly until I close the browser. How do I stop it?

    Every time I click on a link, multiple tabs open rapidly, one after another, until I close the browser. This does not happen when I use Internet Explorer.
    == This happened ==
    Every time Firefox opened

    Firefox includes options of how to handle different content types, in your case the mailto links are probably set to "Use Firefox". For details of how to fix this see [[Firefox keeps opening many tabs or windows]], in particular the section "Change the action for a content type".

  • Safari status bar disappears.  I have tried clicking on show status bar and it will only appear when I move the cursor to the top of the screen.  I can not minimize the open page only full screen or close the browser.  Any idea how the rectify this

    Safari status bar disappears. I have tried clicking on show status bar, under the View tab and it will only appear when I move the cursor to the top of the screen. I can not minimize the open page, only full screen or close the browser. Any idea how the rectify this issue?

    One enters and exits full-screen with control+command+F keys. This is on the View menu in Safari. Optionally, the green traffic light in your browser title bar, if you roll over it, has the full-screen control it it. While in full-screen mode with Safari, moving your mouse pointer virtually up, and off-screen reveals the Safari title bar again, and you can click the green traffic light to exit full-screen mode.
    You can hide/show the status bar by simply typing command+/. This too, is on the Safari View menu. and in 10.10.1 — it works reliably for me.

  • How the system automatically kills the process when I close the browser?

    Hi everybody,
    I have the following problem: I run a report on the web browser. Suppose the user want to detail on one of the characteristics of report. If this takes long time (there are many records in report) and the user closes the web browser, the SAP system still run the proccess (in SM50 I see the dialog process still working, althrough the user closes the browser). This didn't happen in Excel, means, if the user press the 'Cancel' button when he/she tried to detail on one characteristic, the corresponding process is killed too (I see in SM50 how the corresponding dialog process is removed).
    How can I solve this ? Any idea about this?
    Thanks in advance.
    Florina

    Florina,
    there is a timeout set for the web session and the session would get automatically terminated after some time ..
    Some options are :
    1. Use Stateless Templates
    2. There is a Web Template setting called "Automatic Session Management" which uses a page wrapper cookie and kills the session when the person navigates from the page.. - <b>have changed it from previous answer after seeing Anil's post - apologies</b>
    3. If you are using EP  , you could implement DSM Terminator for the same.
    All the above( except 3) will not be suitable for stateful templates , if you want export to excel capability , or printing capability or the capability to save the pages as HTML for local use , you have to use stateful templates.
    First you would have to decide whether to use statefull or stateless templates and then depending on the choice made , go for any of the above. In case non of them work out for you , there is another option , but that would include a lot of javascript and using some command line parameters , update this post and I can tel you about the other if required..
    Hope it helps..
    Arun
    Assign points if useful
    Message was edited by: Arun Varadarajan

  • Can't click the browse file button

    When I click the Browse file button to upload a photo or a pdf from my computer, the dialog window does not show up at.Why does this happen, how can I fix it.

    Could you "name names" on your host and/or the control panel it uses? That may help in searching for past threads about that particular software to either find a workaround or confirm that it is an unsolved problem.
    Meanwhile, could you also check for error messages in Firefox's Browser Console? Here's how I suggest doing that:
    (1) Open Firefox's browser console using either:
    * Ctrl+Shift+j
    * "3-bar" menu button > Developer > Browser Console
    * (menu bar) Tools > Web Developer > Browser Console
    (2) Click the Clear button to flush the existing messages
    (3) Reload the page containing the upload button, then check for script or security error messages in the console
    (4) Click the Upload button and select a file, then check for any new messages in the console
    (5) If there is a final step to submit the file or start the upload process, trigger that and check for any new messages
    You can select and copy (Ctrl+c) content from the console into a reply for comment by volunteers. However, you can ignore style warnings as those seldom will block functionality ("unclick" the CSS button at the top of the console to temporarily hide those messages).

  • When I close the browser, firefox won't open again. I get the message "Firefox is still running, restart your computer." How do I fix this?

    When I close the Firefox browser by clicking on the X in the upper right-hand corner of the screen, the window closes. But when I want to open Firefox again, I cannot. Instead, I get a message, "Firefox is still running. Restart your computer." This happens a few times a week and is very disconcerting. How do I fix this problem?

    I will only close the browser by using your suggestion, File > Exit, from today on, and see what happens. Thank you for your expedient reply.

  • When I have the downloads window open and I close the browser window, how can I get the browser to open the homepage the next time I start it while the download window is still open?

    When I have the downloads window open and I close the browser window, the next time I reopen the browser while the downloads are still going, it returns me to the last page I was on. All previous versions of Firefox would return me to my homepage which I would prefer. Please let me know if this is possible.

    When you re-open Firefox and choose Restore Session, by default it picks up your most-recently-open window, and the other windows should then show up in Recently Closed Windows.
    The Firefox add-on Session Manager lets you manage how many closed windows and closed tabs are saved, in case it's not enough.

  • How can I get my desktop page to open when I close the browser and then re open it?

    when I click the red x to close the browser, when I come back to open the browser later, the last page I was viewing. last session opens, even all other tabs behind it, instead of my google page (my home page)? can this be fixed) I know I can just click the google word in the search bar, but should not have to do this!

    {
    "application": {
    "name": "Firefox",
    "version": "32.0.3",
    "userAgent": "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0",
    "supportURL": "https://support.mozilla.org/1/firefox/32.0.3/WINNT/en-US/"
    "crashes": {
    "submitted": [],
    "pending": 9
    "modifiedPreferences": {
    "browser.cache.disk.capacity": 358400,
    "browser.cache.disk.smart_size.first_run": false,
    "browser.cache.frecency_experiment": 3,
    "browser.places.smartBookmarksVersion": 7,
    "browser.sessionstore.upgradeBackup.latestBuildID": "20140923175406",
    "browser.startup.homepage_override.mstone": "32.0.3",
    "browser.startup.homepage_override.buildID": "20140923175406",
    "dom.mozApps.used": true,
    "extensions.lastAppVersion": "32.0.3",
    "gfx.direct3d.last_used_feature_level_idx": 0,
    "network.cookie.prefsMigrated": true,
    "places.history.expiration.transient_current_max_pages": 104858,
    "places.database.lastMaintenance": 1413230897,
    "plugin.disable_full_page_plugin_for_types": "application/pdf",
    "privacy.sanitize.migrateFx3Prefs": true,
    "storage.vacuum.last.places.sqlite": 1413230897,
    "storage.vacuum.last.index": 0
    "graphics": {
    "numTotalWindows": 1,
    "numAcceleratedWindows": 1,
    "windowLayerManagerType": "Direct3D 10",
    "windowLayerManagerRemote": false,
    "adapterDescription": "AMD Radeon HD 7670M",
    "adapterVendorID": "0x1002",
    "adapterDeviceID": "0x6840",
    "adapterRAM": "1024",
    "adapterDrivers": "aticfx64 aticfx64 aticfx64 aticfx32 aticfx32 aticfx32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a atitmm64",
    "driverVersion": "13.151.0.0",
    "driverDate": "8-19-2013",
    "adapterDescription2": "",
    "adapterVendorID2": "",
    "adapterDeviceID2": "",
    "adapterRAM2": "",
    "adapterDrivers2": "",
    "driverVersion2": "",
    "driverDate2": "",
    "isGPU2Active": false,
    "direct2DEnabled": true,
    "directWriteEnabled": true,
    "directWriteVersion": "6.3.9600.17111",
    "webglRenderer": "Google Inc. -- ANGLE (AMD Radeon HD 7670M Direct3D9Ex vs_3_0 ps_3_0)",
    "info": {
    "AzureCanvasBackend": "direct2d",
    "AzureSkiaAccelerated": 0,
    "AzureFallbackCanvasBackend": "cairo",
    "AzureContentBackend": "direct2d"
    "javaScript": {
    "incrementalGCEnabled": true
    "accessibility": {
    "isActive": true,
    "forceDisabled": 0
    "libraryVersions": {
    "NSPR": {
    "minVersion": "4.10.6",
    "version": "4.10.6"
    "NSS": {
    "minVersion": "3.16.5 Basic ECC",
    "version": "3.16.5 Basic ECC"
    "NSSUTIL": {
    "minVersion": "3.16.5",
    "version": "3.16.5"
    "NSSSSL": {
    "minVersion": "3.16.5 Basic ECC",
    "version": "3.16.5 Basic ECC"
    "NSSSMIME": {
    "minVersion": "3.16.5 Basic ECC",
    "version": "3.16.5 Basic ECC"
    "userJS": {
    "exists": false
    "extensions": [
    "name": "Logitech SetPoint",
    "version": "6.5",
    "isActive": false,
    "id": "{F003DA68-8256-4b37-A6C4-350FA04494DF}"
    "name": "Norton Toolbar",
    "version": "2014.7.8.23",
    "isActive": false,
    "id": "{2D3F3651-74B9-4795-BDEC-6DA2F431CB62}"
    "name": "Skype Click to Call",
    "version": "7.3.16540.9015",
    "isActive": false,
    "id": "{82AF8DCA-6DE9-405D-BD5E-43525BDAD38A}"
    "experiments": []
    }

  • How do I customize the "Navigation Tool Bar" by adding the print ICON so that the ICON will remain when I close the browser?

    I have tried SEVERAL times to customize the "Navigation Tool Bar" by adding the print ICON. Every time I do this it works until I close the browser then I have to re-add the ICON the next time I open the browser. How do I make the ICON stay from session to session?

    See [[toolbar keeps resetting]].

  • My iPhone is getting stuck for a few seconds everytime I do something,  if i type a letter it will type it twice or a few times, if i click to close the browser it stucks there for a few seconds before closing, if i try to open some app it gets stuck ther

    My iPhone is getting stuck for a few seconds everytime I do something,  if i type a letter it will type it twice or a few times, if i click to close the browser it stucks there for a few seconds before closing, if i try to open some app it gets stuck there.
    I have restored it and loaded the backed up material again. But this problem doesnt seem to go away. Sometimes it is too much sometimes it is not noticeable, so what exactly could be wrong and what ALL should I do to get it fixed?  Please reply.

    Thank you. You are very kind. First I backed everything up, then restored as a new phone, and then i couldn't see the contacts, the contacts were not restored when i restored as a new phone. So in order to get the contacts I restored from the backup but then the same problem happened again.
    What I meant to saw was that the probelm disappeared when i restored as a new phone, but it reappeared when i restored from the backup. So is there a way to just somehow get the old contacts when the phone is restored as a new phone. All I need from the current phone is the contacts to be there when I retore as a new phone.
    I hope I am clear.
    Kindly help

Maybe you are looking for

  • Why can't I change my primary email address in Apple ID?

    I want to change my primary email address to the one I use most for be the same as my Apple ID. Right now it is an old email address but when I try to change it I get a message that it is already set up in an Apple ID account.

  • Alert monitor in production

    Hi Gurus I have the following questions regarding the alert profiles in production landscape and. Is there a way to transport the alert profiles from the AUD system. Is it a good practice to make the alert monitors in the production system. i have ma

  • JMS Durable Distributed Topics

              Please forgive my ignorance if I am doing something silly. I am new to Weblogic           and JMS, but learning a lot quickly. Any help will be greatly appreciated.           I am running weblogic 8.1 with no service packs in a development

  • Enhancing Attendances infotype

    hello Experts, We would like to add a text field to the Attendances infotype. When trying to ehance the infotype 2002 using PM01 transaction in Single screen, we receive the below error: Infotype 2002 can not be enhanced Message no. PG383 Diagnosis I

  • Rollover image NOT hiding

    I have a weird glitch I can't figure out with one of my rollover images. I am using a smart shape as a button and have placed a rollover image over top of it so the two together will function as a rollover button like on webpages. The 'button' is gro