Skip to Content
avatar image
Former Member

Prompting users for confimation when closing browser window

Hi All,

I would like to prompt the user with a popup-screen asking for confirmation that he wants to close the browser when hitting the browser-close ('X') button. Is this possible ?

If the user chose to cancel the browser window shoud remain open, with all content as it was... and of course if he chooses to continue the window should just close.

the WDA app is straight forward, and not running inside the portal.

Thanx in advance 😊


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 26, 2010 at 11:11 AM


    Please open the below thread. May be it will help you.

    Close Web Dynpro Application on click of button

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hmmm - It's actually the other way around... I don't want to close anything, but rather avoid closing the window (or at least prompt to ask)

  • Mar 28, 2010 at 09:55 PM

    Hi. Tonni,

    No, I do not think it is possible, but not due to the WD framework.

    Could you imaging the annoying popup websites that would exist if browsers allowed a window to pop-up on close of another window?

    So It is more down to the way browsers are implimented rather than the WD.

    It would be interesting to see if the business explorer client would eventually raise some sort of window close event that could be trapped - but then again you'd then have different behaviour in the different clients, and that could be worse.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Tonni,

      I thought I should add - the portal does implement a work protection mode that does allow you to prompt users if they navigate away from your page - and one of the best ways to implement that is through the FPM and its work protect mode interface.

      However, that still doesn't help, I'm afraid, in the case where you're trying to stop the user closing the browser window...

      I should also point out that some browsers do indeed produce an event which can be trapped on close of the window, and have been hugely exploited by website designers - to the extent that later/better versions no longer support it. Remember the web pages that when you closed spawned 3 more, and those 3 more etc. etc.



      edit: also worth pointing out that the "Close" button provided within a portal session by the FPM is a form of navigation and can be trapped. Likewise any internal navigation button that perform the same sort of thing within your app.

      Edited by: Chris Paine on Mar 29, 2010 3:08 PM