Problem in Exit button on Browser

Hi,
I am using a Command Toolbar button named Exit. By the way, I am using the below code in the "action" block.
public String cb1_action2()
        // Add event code here...
    FacesContext facesContext = FacesContext.getCurrentInstance();
    org.apache.myfaces.trinidad.render.ExtendedRenderKitService service = org.apache.myfaces.trinidad.util.Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
    service.addScript(facesContext, "window.close();window.opener.location.href = window.opener.location.href;");
    return null;
    }This code is working well in Firefox.(Am using Firefox 13.0).
But It is not working in any other browsers such as Google Chrome, Safari. How can I overcome this?
I apologize for this question which has no root from ADF. Hope I'll get some guidance.
Thanks,
Arun
Edited by: Arunkumar Kootharasan on May 10, 2013 3:59 PM

Hi,
don't think there is a common solution that works with all browsers. For me the code below works fine on IE but fails on FF
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <f:view>
    <af:document id="d1">
      <af:resource type="javascript">
      var myWindow = window;
        function doclose(evt){
            window.close();
        function doopen(evt){
            myWindow=window.open("","","width=200,height=100");
            myWindow.document.write("<p>This is 'myWindow'</p>");
      </af:resource>
      <af:form id="f1">
        <af:commandButton text="close" id="cb1" partialSubmit="true">
          <af:clientListener method="doclose" type="action"/>
        </af:commandButton>
        <af:commandButton text="open" id="cb2" partialSubmit="true">
          <af:clientListener method="doopen" type="action"/>
        </af:commandButton>
      </af:form>
    </af:document>
  </f:view>
  <!--oracle-jdev-comment:preferred-managed-bean-name:TestBean-->
</jsp:root>The page source below will close the main window (IE) if you press the close button immediately. If you press open then it opens a new window. The following close then will close the opened window (which works on FF and IE).
Frank

Similar Messages

  • JS problem w/ back button on browser

    If anyone has a solution for this I would REALLY appreciate it!
    Please go to this url and click on the first thumbnail:
    http://www.atelierviollet.com/dev-2011/30/straw-marquetry.html
    You'll see a large image and 3 thumbnails. When you click on a thumbnail it swaps out the large image. I did that using dreamweavers behaviors. Now if you click the back button on your browser and it doesn't return to the previous web page. The thumbnails put a "#" in the url so you have to click "back" multiple times.
    I want it to function so that users can click the multiple thumbnails and then click "back" on their browser and return to the previous html page. Can anyone help?!
    Thanks in advance

    When used within a link like that, a return false kills the link.  In other words -
    <a href="foo.html" onclick="return false">FOO</a>
    This element will behave just like a link, but you can click on it until you are blue in the face and you won't go anywhere.
    In fact, you *should* use this method on any *null* event links you have on any page that look like this -
    <a href="#" onclick="..."
    Make sense?

  • ESS - Time Accounts- Exit button not working

    We have implemented ESS Business Package, the Time Accounts application's Exit button is not working.
    When we click on Exit, it is not doing anything. In Development env it is working fine, but when it comes to quality it is not working.
    suggest me if we can solve this problem.

    Hi Kiran,
    We had a same problem with "Exit" button for "Benefits Enrollment" in both dev and quality systems. As a workaround we redirected to the specific iView using WDPortalNavigation.navigateAbsolute on clicking "Exit  button".
    Hope this helps.
    Regards,
    Adren

  • Exit button - Opens a new Window

    Portal experts,
    We are facing some problem with exit button in the standard iViews like Bank, personal data.
    When we click on the exit button, it is opening a new window rather than coming out of the iView. I searched for sap notes, didnt find anything.
    can anyone faced this problem?
    Please help us.
    Cheers
    Jay

    Hello Jay,
    Yes you make the settings using Work Protect Mode in the Portal. If you don't want to open a new window you need to configure workprotect mode.
    Simply follow this Note 734861 - WorkProtect Mode - Global Settings
    Let me know in case you face any issues.
    Vijay

  • The Adobe Acrobat/Reader that is running can not be used to view PDF files in a Web Browser. Please exit Adobe Acrobat/Reader and exit your Web Browser and try again.OK. I followed the instruction and the problem still persists.

    I got the following pop-up when I tried to open an online PDF file:
    The Adobe Acrobat/Reader that is running can not be used to view PDF files in a Web Browser.
    Please exit Adobe Acrobat/Reader and exit your Web Browser and try again.
    I tried many time, and it really doesn't work.
    The plug-in I have is Adobe Acrobat 8.3.0.280

    After I upgraded to Firefox 5, I had the same problem and I did a work around temporarily. I went the tools menu, then Add-ons, then clicked the "Plugins" on the left side (4th one down). I "disabled" both Adobe Acrobat 8.3.0.280 and Adobe Acrobat 10.1.0.536 using the disable buttons on the right side. PDF files now open again. However they are outside the actual browser.
    My guess is that Adobe didn't catch up yet with a new update to work with Firefox or vice versa.
    Hope that helps!
    Michael

  • How to make Exit button for Out-of-browser application

    Greetings all,
    This sounds so simple, yet I can't find anything about it.  I want to make an Exit button in a Silverlight 4 Out-of-browser application.  When the user clicks the button, the application is to quit or close or exit.  (The same effect as if the user clicks
    the red X icon in the upper right-hand corner of a window.)
    Any ideas will be appreciated.

    Jonathan --
    Yes, the word Page has taken on many meanings in the last 15 years.  I'll clarify.  When I make a simple Silverlight OOB (out-of-browser) application using Visual Studio 2010, I ask Visual Studio to Add New Item, then choose Silverlight Page.  Let's
    say I name it Page2.xaml.
    By default VS2010 already made another page for me, MainPage.xaml.
    Now, here is my need:  On the page called MainPage.xaml, I want to place a large button that says Exit Application.  When the user clicks that button, I want the application to end and the entire window to close.  This is the standard behavior in most traditional Windows
    applications, for example in Microsoft Word or Microsoft Excel or Microsoft Access.  In any of those traditional applications, the user can, from the menu, choose File/Exit.  If he does, then not only does the application quit, but also the window
    closes itself.  The user doesn't have to click the small red X icon in the upper right corner. 
    That simple behavior of almost all traditional Windows applications, large and small, is what I'm looking for in my simple Silverlight
    OOB applications:  An Exit command that quits the application and closes the window itself.
     Sorry for the confusion.  I really appreciate your help.  Any ideas?

  • Problem activating the back and exit button with the ALV using OO

    I have wrote my first alv using Methods.My problem is that i can't activete the BACK and  EXIT button in the standart toolbar .
    Look my code please .....
    Without PF-STATUS can i do it ?
    *& Report  YDP_DOUBLE_ALV
    REPORT  YDP_DOUBLE_ALV.
    TABLES : YQM_CERT , MARA , YOUTPUT_APPL.
    DATA : ALV_GRID TYPE REF TO CL_GUI_ALV_GRID,
           CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
           FIELD_CAT TYPE LVC_T_FCAT,
           LAYOUT TYPE LVC_S_LAYO.
    DATA : ALV_GRID2 TYPE REF TO CL_GUI_ALV_GRID,
           CUSTOM_CONTAINER2 TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    *       FIELD_CAT TYPE LVC_T_FCAT,
    *       LAYOUT TYPE LVC_S_LAYO.
    DATA: DYNNR TYPE SY-DYNNR,
          REPID TYPE SY-REPID.
    DATA: OK_CODE TYPE SY-UCOMM.
    DATA : BEGIN OF ITAB OCCURS 0.
            INCLUDE STRUCTURE YQM_CERT.
    DATA   END OF ITAB.
    DATA : BEGIN OF ITAB1 OCCURS 0.
            INCLUDE STRUCTURE YOUTPUT_APPL.
    DATA   END OF ITAB1.
    *  MODULE DISPLAY_ALV OUTPUT
    MODULE DISPLAY_ALV OUTPUT.
      SET PF-STATUS 'ZST9'.
      PERFORM DISPLAY_ALV.
    ENDMODULE.                    "DISPLAY_ALV OUTPUT
                       "DISPLAY_ALV OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    * text
    MODULE USER_COMMAND_0100 INPUT.
      CASE OK_CODE.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    START-OF-SELECTION.
      LAYOUT-ZEBRA = 'X'.
      LAYOUT-GRID_TITLE = 'YQM_CERT'.
      LAYOUT-CWIDTH_OPT = 'X'.
      LAYOUT-SMALLTITLE = 'X'.
      SELECT  * FROM  YQM_CERT INTO ITAB.
        APPEND ITAB.
      ENDSELECT.
      SELECT  * FROM  YOUTPUT_APPL INTO ITAB1.
        APPEND ITAB1.
      ENDSELECT.
      CALL SCREEN 100.
    END-OF-SELECTION.
    *&      Form  DISPLAY_ALV
    *       text
    FORM DISPLAY_ALV.
      IF ALV_GRID IS INITIAL.
        CREATE OBJECT CUSTOM_CONTAINER
          EXPORTING
    *      PARENT                      =
            CONTAINER_NAME              = 'CC_ALV'
    *       style                        =
    *      LIFETIME                    = lifetime_default
          REPID                       = REPID
          DYNNR                       = DYNNR
    *      NO_AUTODEF_PROGID_DYNNR     =
    *    EXCEPTIONS
    *      CNTL_ERROR                  = 1
    *      CNTL_SYSTEM_ERROR           = 2
    *      CREATE_ERROR                = 3
    *      LIFETIME_ERROR              = 4
    *      LIFETIME_DYNPRO_DYNPRO_LINK = 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.
        CREATE OBJECT ALV_GRID
          EXPORTING
    *    I_SHELLSTYLE      = 0
    *    I_LIFETIME        =
            I_PARENT          = CUSTOM_CONTAINER
    *    I_APPL_EVENTS     = space
    *    I_PARENTDBG       =
    *    I_APPLOGPARENT    =
    *    I_GRAPHICSPARENT  =
    *    I_NAME            =
    *    I_FCAT_COMPLETE   = SPACE
    *  EXCEPTIONS
    *    ERROR_CNTL_CREATE = 1
    *    ERROR_CNTL_INIT   = 2
    *    ERROR_CNTL_LINK   = 3
    *    ERROR_DP_CREATE   = 4
    *    others            = 5
        IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
    *      I_BUFFER_ACTIVE               =
    *      I_BYPASSING_BUFFER            =
    *      I_CONSISTENCY_CHECK           =
             I_STRUCTURE_NAME              = 'YQM_CERT'
    *      IS_VARIANT                    =
    *      I_SAVE                        =
    *      I_DEFAULT                     = 'X'
           IS_LAYOUT                     = LAYOUT
    *      IS_PRINT                      =
    *      IT_SPECIAL_GROUPS             =
    *      IT_TOOLBAR_EXCLUDING          =
    *      IT_HYPERLINK                  =
    *      IT_ALV_GRAPHICS               =
    *      IT_EXCEPT_QINFO               =
    *      IR_SALV_ADAPTER               =
          CHANGING
            IT_OUTTAB                     = ITAB[]
    *      IT_FIELDCATALOG               =
    *      IT_SORT                       =
    *      IT_FILTER                     =
    *    EXCEPTIONS
    *      INVALID_PARAMETER_COMBINATION = 1
    *      PROGRAM_ERROR                 = 2
    *      TOO_MANY_LINES                = 3
    *      others                        = 4
        IF SY-SUBRC <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ELSE.
        CALL METHOD ALV_GRID->REFRESH_TABLE_DISPLAY
    *       EXPORTING
    *         IS_STABLE      =
    *         I_SOFT_REFRESH =
    *       EXCEPTIONS
    *         FINISHED       = 1
    *         others         = 2
        IF SY-SUBRC <> 0.
    *      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    "DISPLAY_ALV

    Hi
    U need  to active them in your status ZST9.
    Max

  • Exit button problem

    At the end of my Captivate 2 project I have viewers click the
    X (exit ) button on the Captivate skin to exit. Sometimes it works
    and sometimes it doesn't. Couldn't find any settings. Any ideas?
    Thanks! Tom

    I am experiencing the same issue. For security support
    reasons, I've been asked to convert my *.EXE training modules to
    Web-based *.SWF. All the exit/close buttons in the EXEs work
    correctly. Switching to SWF, the Player X(Close) button is inactive
    and any created Exit Buttons do not properly close their respective
    modules. Using the SWF Exit Buttons results in a display of an
    empty frame which provides no means to close and a manually close
    of the IE window must be used. Current environment (Captivate 2
    development, IE 6 Browser w/Flash 9 plugin).
    I have read all the posts that I can find on this issue and
    have even tried JavaScript as a get around without success. I'm at
    a lost as to find an appropriate solution. My days using EXE are
    numbered.
    Thanks. Bob

  • Acrobat plug-in. I get this when try to opem. The Adobe Acrobat/Reader that is running can not be used to view PDF files in a Web Browser. Please exit Adobe Acrobat/Reader and exit your Web Browser and try again. Don't problems w/ Internet Explorer-

    Acrobat plug-in.
    The Adobe Acrobat/Reader that is running can not be used to view PDF files in a Web Browser.
    Please exit Adobe Acrobat/Reader and exit your Web Browser and try again.

    See if you can find a NPPDF32.DLL files in the Firefox program folder (C:\Program Files\Mozilla Firefox\)
    You can see the installed plugins on the about:plugins page.
    * http://kb.mozillazine.org/about%3Aplugins
    You can set the pref plugin.expose_full_path to true on the about:config page to see the full path of plugins on the about:plugins page.
    It is best not to leave that pref set to true as it exposes that full path to web servers, so reset that pref to false after you are done with the about:plugins page.
    You can open about:plugins and about:config via the location bar, like you open a website (about: is a special protocol to access some build-in pages).
    If you get a warning when opening the about:config page then you can confirm that you want to continue.
    See Manually uninstalling a plugin:
    * https://support.mozilla.com/kb/Troubleshooting+plugins

  • Problem with Exit push button

    Hi All,
    I have a required field in module pool programming. When i press Exit push button message displays "Fill in all required entry fields".
    I want to exit from program without fill any field.
    Is it possible. plz help me

    Hi,
    In the PF-Status, keep the Functional Type for the EXIT button as E.
    And code for the same button in the module:-
    PROCESS AFTER INPUT.
      MODULE exit AT EXIT COMMAND.
    MODULE exit.
      CASE sy-ucomm.
        WHEN 'EXIT'.
          LEAVE PROGRAM.  "<- to leave the transaction.
      ENDCASE.
    ENDMODULE.
    Hope this helps you.
    Regards,
    Tarun

  • Lightroom problem with the exit button...

    In Lightroom, the window got redesigned in such a way that you can't move the cursor to the absolute top right corner and click to exit like you can in standard windows--you have to aim with the cursor on the exit button which is annoying.

    Just stumbled over the thread.
    Interesting how these discussions evolve.
    Someone points out an unexpected behavior. LR doesn't act conform with every other app on pc. Instead of accept this, people start argueing whether it is necessary to close apps in general, bla bla.
    Why not admit: Yes there is a flaw. There are workarounds, so it's not a deal breaker. We would like to have this addressed by adobe in the next version. It doesn't matter if there are users that never use the cross to close apps. It doesn't matter if there are other ways to close.
    Why change standards? This may be unintentionally here but there are other examples.
    The crop tool in LR.
    The Keyboard shortcuts. In every Adobe Application. I never understood, why there are no 2 adobe-apps that share the same shortcuts. Even standards like ctrl-ins/shift-ins does not work in for exyample in indesign. Drives me nuts. No, I don't want to use use ctrl-c/ctrl-v. I use my mouse with my left hand.
    Copy settings in LR. Ctrl-Shift-C. No other app uses this.
    Why change established standards??

  • Exit button not working in Captivate 7 published output

    Hi. I am using Capivate v7 and am experiecing this problem with published output:
    I am using an Exit button that runs the standard javascript code
         javascript:window.close()
    so that the user can exit the presentation. The button works fine when I test out the presentation using Internet Explorer 8, but when I generate an output and try running the .swf file, the button does not work.
    How do I get an Exit button to work for the .swf output?
    Thanks,
    - Michael Fekete

    Yes, the close X does work 100% of the time. That's because the browser itself is just a window in the operating system. And you are commanding the window to close.
    And you might find yourself asking why that would work while the Exit button fails. And it would be that it's a security issue. Security prevents the window from closing because if a web site was nefarious, it could actually trap you by making changes and quickly closing the window and preventing you from browsing elsewhere.
    It's simple to turn off the Exit button. Just click Project > Skin Editor and clear the Close checkbox.
    Cheers... Rick

  • Exit button not working in Safari

    Has anyone run into this, specifically with Safari? I created a module in Captivate 8, that has a close button on the skin. The module has been uploaded to my clients LMS and it closes no problem on all other browsers except Safari. I tried creating a button on the last page of the slide as well with the "exit" action and that doesn't seem to work either in Safari. Does anyone have an idea how to fix this issue?

    I tried an Exit button (clickbox associated with the action Exit).  It freezes Safari for about 10-15 seconds and then finally closes the browser tab.

  • Exit button doesn't work

    On .swf files, the Exit button in the skin doesn't close the
    file (it works just fine if the file is .exe). All the other
    buttons work fine. Any ideas?

    Hi, I know this issue was a long time ago, but I am experiencing the same problem with a course that has been loaded into the LMS, the exit/close button on the playbar isn't working.  I am using Captivate 5.  I have published using AICC rather than SCORM, as there were some issues with the passing over of scores from the e-learning programme I'd built to the LMS which were resolved by using AICC.  The close/exit button however did work when it was originally published using SCORM!
    I'm considering just removing the exit/close button on the programme and putting a message at the start and at the end to say just close browser window to exit the programme.
    I'd be very grateful if anyone could advise if there is anything else anyone could recommend trying?
    Thank you
    Sarah

  • Exit button issue in Captivate 5

    Hi,
    This is regarding the exit button on the playback controls. I have been using Captivate from version 2. Recently, started using version 5. When I published my simulation, the exit button is not working as earlier. It is also not working from- web server(IIS, Apache), when opened as pop-up as well. In local too however not working. I tried in both IE 7 and Firefox latest version.
    I have seen the response from Adobe on this issue on this forum. It was quite surprising; it did not talk about the solution at all;
    What I am not sure about is -
    1. Why the exit button was working earlier versions.. why is it not working in latest?
    2. Why should when simple code like top.close(); works fine (when coded inside the Captivate)?
    3. Why is Adobe not acknowledging the issue?
    4. Why there is no working around provided in the forums for this issue?
    Could anybody please help me understanding this problem? I am really frustrated.
    Thanks.

    Happy New to all as well!
    You are absolutely correct! The moment reporting is activated, the EXIT no longer functions. Although in my case, we are not using the time/slider bar but custom navigation buttons with an exit button on the last slide (and at the top of each slide).
    This whole EXIT button issue (not just Cp 5 but Cp 6 as well) is nearly bringing me to the point of tears! This is really ridiculous! I am in a tough position right now where my manager may be wondering if I am right person for this job because I cannot make a little EXIT button work in our lessons.
    "Solutions" or excuses that I have received
    - Just remove the EXIT button -- No, we use a standard corporate template which hundreds of employees are already familiar with. To remove the EXIT button and instruct the learner to just close the browser would be unacceptable and a rather inelegant way to exiting a lesson.
    - It is a tough issue that isn't Captivate's fault
      With all due respect to the awesome person who keeps stating that, I have a feeling that you have not used other rapid elearning tools. Building an EXIT button in all the other major elearning tools is easy and works every time.
    The source of my personal difficulty is that every other course that was built by previous developers (not using Captivate), all open in a child window and all have a working EXIT button.
    I believe the PRIMARY reason for this problem might be in the fact that... inexplicably... Captivate does not offer an option to start a lesson in a CHILD window (i.e. separate browser window). This is why no javascript in the world will allow the tab to close (e.g. EXIT button). Closing a tab or browser window via javascript only works when the same instance was previously opened by a script using the window.open method. In other words, you can only use the javascript method to close an instance that was spawned via javascript.
    This should explain why lessons published in Lectora (et al) always have working EXIT buttons every time and in every browser (minor exception is Opera for unrelated reasons).
    The second red box is just another one of my problems with Captivate 6 (not related to this topic).
    Solution????
    I've been racking my brain trying to modify Captivate's HTML/javascript in order to carry over the AICC (or SCORM - same process) variables into a child window.
    Like another participant stated, you can't simply rename the original index.html to index2.html and create a redirection like this:
    <script type="text/javascript">   
    window.open("index2.html","lesson","location=0,toolbar=0,status=0,resizable=1,width=975,he ight=600");</script>
    <body>
    Yes, I tried this as well... but unfortunately, it breaks the AICC to LMS connection. *BUT* I can promise one thing... using the above redirection, does guarantee that your EXIT button works every time! Pity the LMS connection breaks!
    QUESTION?
    Does anyone have advanced knowledge of javascript in order to code the INDEX.HTML to open the lesson in a child windows AND maintain a connection to the LMS?

Maybe you are looking for

  • Invoice verification is not posted with T.Code MIRO

    Hi Friends, 1) I created a purchase order with T.Code: ME21N, and Enter Goods Receipts with T.Code: MIGO after that Invoice verification with T.Code:MIRO, but it is not posted: Error Message is: Error in account determination: Table T030K Co.Code: RK

  • Shipping Date was off and no updates on when it wil arrive.

     Hi there, I purchased a 50" inch Samsung TV at the beginning of this week 4/27 and when I chose my shipping option, Best Buy's website stated that I could either pay 60 bucks for a next day (4/28 Tuesday) delivery or get it delivered by Weds 4/29 fo

  • Starting CS4 from bat file

    I can successfully start Photoshop from a .bat file (.bat file has the line "START Photoshop") when I'm logged onto my Vista user account.  But when I switch to the guest account and the bat file continues to run in my normal user session, it is unab

  • Help setting up connection

    I am a bit of new to computer world and would very much appreciate any advice or suggestions I am having a bit of problem connecting my new PC to my router (WRT54G) wirelessly.  I have a PC (XP) with modem (Westell 2200) and a router already installe

  • SAP router installation for VPN method

    Hi All, Can any one share me the steps to perform SAP Router Configuration with VPN method. Also what are changes i need to  make in saproutab file. Appreciate your inputs. Thanks Pradeep.