Close the window (browser after execute business action

I have ceated a JSP which will trigger a popup. How can I close the popup after executing some business action in the pop.jsf ?
in addition, since my popup will return value to window.opener, but I have tried that I have a page forward in the popup, it cannot locate the window.opener and hence cannot return value to the opening windows but only return me error 404 page not found.
actually my popup is just like a searching form, user can input some string to serch the DB and then display the data in datatable. then user can pick up the record he would like to choose and returning a code back to the opening windows...so i want to close the popup, or returning the value to the opening windows if i have a screen refresh in the popup
Can anyone help in this issue? Many thanks

Hi,
I'm not sure I've fully understood what you require... but here's something you can try.
Lets say that you search for some user entered criteria and display results to the user in the pop up JSP. I am assuming that there would be some user action on which you want to return something to the parent window and then close the child window.
You can access the parent window using:
window.opener.document.<form name>.<field name>
and then close the pop up window using a simple window.close();
On the other hand, if you want to close the window w/o any user inputs (directly after the server side processing), then make the server side processing send a status parameter back to the pop up window. For example, set a parameter in the request which will trigger a JavaScript in the pop up window to close itself.
Hope this helps.
Cheers !
Vinay

Similar Messages

  • End-user closes the Web browser's window...

    Hi ,
    I have an Exit_Form selection on a menu.....
    Is it possible the code being there to be executed whenever the end-user closes the web-browser's window.....???
    I use Dev10g.
    Thanks , a lot
    Simon

    Unfortunately... is is not applicable....because:
    1) Many users(application users) connect via a db user to the database.... , so i cannot relate each application user to a db session.
    2) The trigger on_logoff can not be used because of the first note....
    3) As i have written in my previous post the "exit_form" is not 'pure PL/SQL' code but 'forms' code.... It contains some 'erase(global_variables)' which are unknown to the db......
    Thanks , anyway...
    Simon

  • I have my FireFox browser set to delete the history when I close the window. It was working for a while and has recently just stopped with no changes to the settings.

    I have my FireFox browser set to delete all the history when I close the window. It was working for a very long time and has recently stopped with no changes to the settings. This has happened once before and I deleted FireFox and re-downloaded it, that solved the problem for a short period of time but the issue has come up again. How can I fix this?

    Can you check your configuration again? Maybe something went pear-shaped somewhere. It's located in Tools | Options | Privacy and then click the Settings button (see screenshot).

  • Why wont firefox load after i close the window ? it tells me it is already running in the background and to close that window before opening again. took 10 tries before it would load again !

    this has been going on for some time. 2 months maybe. i can hear the hard drive winding up/down after i close the window, and then comes a long narrow blue window stating what i have written.

    See
    * [[Firefox is already running but is not responding]]
    Try closing any running instances of ''firefox.exe'' (and plugincontainer.exe) using something such as Task Manager. That should allow you to then restart Firefox.
    As for iLivid. Possibly it also has associated apps or extensions with names not including the word iLivid. Looking at their own FAQs there are instructions to remove iLivid using the Windows Control panel, and mention of other bundled software that you may wish to remove. It seems it is more of a nuisacne rahter than out and out malware.
    * see http://www.ilivid.com/faq.htm (page scrolls for more info) but includes:
    How do I uninstall the software?
    The software can be removed in a simple was like any other software:
    Go to the Windows Start menu and then to Control Panel > Add/Remove ("Programs & Features" in Vista & Windows 7) and click "Remove" next to the software name (e.g iLivid Download manager / Windows iLivid Toolbar ).
    During the installation bundle software are offered, each can easily be removed following those instructions: Uninstall Yontoo Addon , Uninstall Search Toolbar (powered by Bing) or Uninstall Babylon.

  • Can applet close the Web browser window it embedded in?

    I know that a link or button in the Web browser can close the browser window. But I really don't if the applet can also do it.

    This site does have a search function you know, and if thats too much trouble there is google:
    http://www.google.com/search?q=site%3Asun.com+%22java+to+javascript%22&ie=UTF-8&hl=nl&lr=
    This should point you in the direction of a thing called JSObject
    Here is some code since I have this in my archive anyway:
    the html file:
         <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
                  height="0" width="0" >
            <param name="code" value="someApplet.class" />
            <!--[if !IE]> Mozilla/Netscape and its brethren -->
            <object classid="java:someApplet.class"
                    height="0" width="0"
                    >
            </object>
            <!-- <![endif]-->
          </object>
    <LABEL id="lblOutputText">This text is the HTML text </LABEL>the applet:
    // new class for jsObject!!!! compile this: javac -classpath "C:\Program Files\Java\j2re1.4.2_01\lib\plugin.jar" someApplet.java
    // since jaws.jar does not exsist anymore
    // in 1.4.0 to compile: javac -classpath "C:\j2sdk1.4.0_03\jre\lib\jaws.jar" someApplet.java
    import netscape.javascript.*;
    public class someApplet extends java.applet.Applet {
        JSObject win;
        public void init() {
             try{
                 win = JSObject.getWindow(this);
    // you need win.eval("window.close();"); // to close the window. if the current window is not a popup
    // opened by a parent with window.open than the user will get a waring, your next question probably will
    // be "can I stop this warning" and the answer is simple: NO
                 JSObject textBoxLabel = (JSObject) win.eval("document.getElementById('lblOutputText')");
                 textBoxLabel.setMember("innerHTML", "<center><h1>Some text</h1></center>");
            }catch(Exception e){
                 e.printStackTrace();
    }

  • When I try to play several games like: FiFa 2011HD, Real Racing2HD and TransformersHD, after I selected the configurations to start to play it, and then the game close  the window and returns to the Ipad main screen. I upgraded my Ipad at Apple store but

    When I try to play several games like: FiFa 2011HD, Real Racing2HD and TransformersHD, after I selected the configurations to start to play it, and then the game close  the window and returns to the Ipad main screen. I upgraded my Ipad at Apple store but nothing happened. Anyone knows how can I resolve it, please ?

    1. first try to reboot your ipad
    if that don't work then try downloading another app don't matter which one
    and if it fix your problem you can just delete it afterwards

  • How to close a HTTP session when a user closes the window

    Hi,
    I am having problems when closing the browser of a BW web report. After I closed the browser by going File->close, I ran SM04 and found out the Plugin HTTP session hangs at the server side.
    How can we terminate the Plugin HTTP session at the server side when user closes the internet browser?
    I did implement a logoff function at my web template and this was implimented on the Menu page, if user clicks on the logoff, the Plugin HTTP session is terminated at server side correctly.
    If user navigates to the other pages from the main page... then the logoff function was not implimented in the other pages. So many of the users are closing the windows directly. Eevn if we impliment logoff in all the subpages, As you know, 50% of time user will close the report by closing the internet browser instead of clicking the logoff. That leaves lots of hanging Plugin HTTP sessions at our server side.
    Regards,
    Tony

    Hi,
    And also take a look on the Genral property of the web template. We solved this problem by changing only this property (no extra things).
    <b>Property:                            Value</b>
    Automatic Session Management:           Active
    With rgds,
    Anil Kumar Sharma .P
    Message was edited by: Anil Kumar Sharma

  • Automatically close the window

    Hi All.
    I am having a BSP which has a few buttons. Those buttons call some methods of standard class.
    That method then defines a navigation target as "EXIT_PAGE". This page I have defined in my customized BSP application.
    Now I just want to close the window and do nothing else in this page of my customized application.
    How can I do that?
    Please note that there will be no additional button that I can show to users on clicking of which I could fire the window.close event.
    Can I just navigate to a javascript page which will close the window?
    To elaborate more:
    The standard method calls this statement after doing whatever it has to do:
              navigation->next_page( 'EXIT_FINAL' ).
    Now this page I have defined in my customized BSP as follows:
    Start                                  Navigation Request                  Target
    document_redirect.htm     EXIT_FINAL                                document_final.htm
    Now in this document_final.htm, I just want to close the window and do nothing else without clicking on anything.
    Another related doubt: I am well versed in Webdynpro abap, but not so much in BSP. In web dynpro abap, we can fire windows exit plug and the application knows it is closed. So in SICF, we can write the code to logoff to close the window.
    In BSP, how can we make sure that the code that is writtten in the logoff tab of SICF service is executed? That might also solve my problem.
    Thanks in adv.

    Same thing Durai.
    I actually went to View-SOurce: The following code comes there:
    <h t m l>
    <h ead><title>Appraisal Document            </title></h ead>
    <s cr i p t language="J a v a S c ri pt">
    function exit BSPApplication(){var prop = 'height=100,width=400,top='+(screen.height-100)/2+',left='+(screen.width-400)/2;var out = windowdotopen('document_exit.htm','_blank',prop);documentdotgetElementById("4A527F69BC0E00B2E10080000AFB4223_FRAMESET")dotonunload = null;}</s c ri p t>
    <f ram eset id="4A527F69BC0E00B2E10080000AFB4223_FRAMESET" rows="*,0" on un lo a d="exitBSPApplication();"  resize ="no" framespacing="0" fra meb order="0">
    <fr am e name="4A527F69BC0E00B2E10080000AFB4223_A" src="document_redirect.htm?PREVIOUS_VIEW=">
    <fr  a me name="Block_Back" s r c ="a b out.htm">
    < / f ra meset>
    </h t m l>
    Then I saw that this code is from the starting BSP page document.html. The code in that is as follows:
    < % @ pa g e l a n guage="a ba p" %>
    < %
      " Copy this page into your BSP application, and change line below.
      " This page should always used be as entry point into application.
      DATA: target_page               TYPE STRING VALUE 'document_redirect.htm'.
      DATA: about_page               TYPE STRING VALUE 'about.htm'.
      DATA: do_not_delete_sso2_cookie TYPE XFELD  VALUE SPACE.
    % >
    < h t m l>
      <h e ad>
        <title>< % =  otr(PAOC_HAP_DOCUMENT_UI/TITLE_DOCUMENT) %></title>
      </h e ad>
    <s c ri p t l an guage="J av aS cr  ip  t">
    < %
       DATA: guid TYPE GUID_32.
       CALL FUNCTION 'GUID_CREATE' IMPORTING ev_guid_32 = guid.
    % >
    f u nc tion exit BSPApplication()
    < %
    DATA: pvi TYPE i.   "customer message 319887
    TRY.
       pvi = runtime->portal_version_major.
       CATCH cx_sy_conversion_error.
         pvi = 0.
    ENDTRY.
    if pvi < 6
    or runtime->session_manager->is_running = 0. % >
      var prop = 'height=100,width=400,top='+(screen.height-100)/2+',left='+(screen.width-400)/2;
      var out = windowdotopen('document_exit.htm','_blank',prop);
      < % endif. % >
      documentdotgetElementById("<%=guid%>_FRAMESET")dotonunload = null;
    < / s  c ri p t>
    < %
      if application->frameIsNotInitial is initial.
        application->frameIsNotInitial = 'X'.
    % >
    <f ra meset id="<%=guid%>_FRAMESET" rows="*,0" on u n lo ad="exitBSPApplication();"  resize="no" framespacing="0" frameborder="0">
        <f ra me name="<%=guid%>_A"  s r c ="<%=target_page%>?PREVIOUS_VIEW=<%=previous_VIEW%>">
        <fr am e name="Block_Back"  s r  c="<%= about_page%>">
    < / f rameset>
    < %
      else.
    % >
    <f ra meset id="<%=guid%>_FRAMESET" rows="*,0" resize="no" framespacing="0" frameborder="0">
        <fr a me name="<%=guid%>_A" s r c="<%=target_page%>?PREVIOUS_VIEW=<%=previous_VIEW%>">
        <fr ame name="Block_Back" s r c="<%= about_page%>">
    </f ra meset>
    <%
      endif.
    %>
    </h t m l>
    I tried to put selfdotclose and windowdotclose in the exit BSPApplication().function. But does not work.
    Any clues. Totally lost now
    Thanks in adv.

  • Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.

    Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.  Is there some way I can open the contact list, click on all of the individual addresses to which I want to send the email without the list closing between each address entry, and have all of my address entries be listed to the email at one time?  Something like it works in Gmail.  I do not want to use set lists, I want to enter different addresses each time I send an email.  And I am a very slow typist, so I don't want to type the first few letters of each recipient's name.  It is much faster for me to just click on the e-mail addresses in the list as a group.  It doesn't make any sense to me to have to reopen the contact list for each address, when it should be so easy to click on all of the addresses I want at one time and then click once to add them all to the email as a group.  If there is a solution to this, please tell me.  Thanks.

    Vatlily,
    Try this:
    1. Select Mail>File>New Message.
    2. Select Mail>Window>Address Panel.
    3. Use (command+click) on the desired addressees in the Address Panel to create the list.
    4. Click "To:" on the top left of the Address Panel.
    The group that you selected will be added to the "To" field in your New Message.

  • Okay, i have 2 bugs with maverick.  First, when I delete a file within a window, the files deletes but the preview doesn't delete until I close the window and reopen it.  Second, I work on a network of computers and the search feature is now buggy...

    Okay, i have 2 bugs with maverick.  First, when I delete a file within a window, the files deletes but the preview doesn't delete until I close the window and reopen it.  Second, I work on a network of computers and the search feature is now buggy...  When I search for a file, A) it asks me if it's a name, or it wont produce anything, and B), its slower than in prior OS versions and in some instances I have to toggle to a different directory and go back to my original directory in the search: menu bar or the search wont produce anything...  Very buggy. 

    It appears to me that network file access is buggy in Maverick.
    In my case I have a USB Drive attached to airport extreme (new model) and when I open folders on that drive they all appear empty. If I right click and I select get info after a few minutes! I get a list of the content.
    It makes impossible navigate a directory tree.
    File access has been trashed in Maverick.
    They have improved (read broken) Finder. I need to manage a way to downgrade to Lion again.

  • Regarding the alert Message when i try to close the window

    Hi All,
    I am trying to give the alert message when the user tries to close the window.
    For this i have coded a jsp in which i have written
    <html>
    <head>Test in the Page Ajay</head>
    <body onUnload="alert('Test UnLoad')">
    </body>
    </html>
    and in the portalapp.xml i have given as jspnative.
    then if i try to unload the page the alert message is not executing.
    Plz help me out in this.
    Thanks
    Ajay

    Delete the iPod photo cache, as described here:
    http://support.apple.com/kb/ts1314

  • Firefox will close when i close the window but the process doesn't shutdown ever since i had updated to FF25

    I am running Win. 8.1 and had no issues with FF 24. Since upgrading to FF 25, firefox will appear closed when i close the window but the process doesn't shutdown. I have to go into Task Manager to end the process. I can then launch it again.

    SOLUTION (possible).
    Hi all. I had this problem as well. I currently run FF26. A week or so ago, out of nowhere FF wouldn't exit - the window would close but firefox.exe process would keep running in the background using about 50% of CPU. Not sure if it's connected, but just prior to that I clicked on a link on Facebook that looked like spam website, nothing happened, site loaded (sort of, all I saw was a msg - Please Wait...) but nothing happened, I have Eset antivirus and it monitors network traffic and files for viruses, so maybe it prevented my PC getting infected...
    So, I had this problem for a few days, was searching the net for solutions, but nothing seem to help. Then, just out of luck I did something that WORKED!
    Here's what I did. I noticed that svchost.exe was using a lot of CPU alongside with FF. I ran ProcessExplorer to see what might be connected to this process, the list was long and I didn't have any idea where to start, so what I did was - Right click on svchost process, choose Debug and dismiss the warning. In a few seconds svchost process quit and after that FF started closing properly.
    I had to re-enable all my plugins and themes I disabled prior, I also lost my history and preferences which I trashed in the process of searching for solution. But heck, it worked, hopefully for good. Now if someone could point out the real cause of this and fix it for everyone - that would be great. Cheers!

  • 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

  • How can avoid to close the window?

    My problem is that when user decides to close a window, system should ask conferm to that action, if user responds no, the window should stay, vice versa window should be closed if user conferm closing.
    Ok my code:
    void this_internalFrameClosing(InternalFrameEvent e) {
    int r;
    this.setClosable(false);
    JOptionPane dlg = new JOptionPane();
    r = dlg.showConfirmDialog(this,"Are you sure to quit?","Quit?",dlg.YES_NO_OPTION);
    if (r == dlg.YES_OPTION) {
    this.setClosable(true);
    doesn't work. How can I cancel closing of the window, because window will be closed anyway!

    This will prevent your internal frame from closing:
    frame.setDefaultCloseOperation(JInternalFrame.DO_NOTHING_ON_CLOSE);
    Then you have to define your closing logic in the internalFrameClosing() method of InternalFrameListener. Be sure to close the window manually using frame.dispose().

  • (Mountain Lion) suddenly the screen turns black, and I have to use the switch to turn it on. And, the screen turns to zoom, and the only way to turn to normal is to close the window and start all over again?

    (Mountain Lion) suddenly the screen turns black, and I have to use the on/off switch to turn it on. And, the screen turns to zoom, and the only way to return to normal is to close the window and start all over again?

    Does the screen go black while you are using the machine? ...or after it has sat idle for a bit?
    If it happens while you're using the machine, check to see if a hot corner has been set for sleep. You can do that here: System Preferences > Desktop & Screen Saver > Screen Saver and click the button labelled "Hot Corners..." in the lower right.
    If it happens after a bit of idle time, that's normal sleep behavior. The delay can be adjusyed here: System Preferences > Energy Saver.
    In either case, pressing any key on the keyboard should bring it out of sleep.
    Re zooming -
    If this happens while in Safari, and you are using an Apple Magic Mouse, a default setting applicable to it is that a soft double-tap on the mouse will zoom the Safari window. A second double-tap will bring it back.
    If it is the entire screen that is zooming, Control plus scroll gesture on the mouse will zoom the whole screen. Repeat with the opposite scroll gesture to bring it back.

Maybe you are looking for