cancel
Showing results for 
Search instead for 
Did you mean: 

Stop the application from closing when Close button pressed on browser.

former_member82844
Participant
0 Kudos

My users would like the option of not closing the Browser when the Webdynpro is running. Is there a way to stop the application from closing when the Close button is press on the browser?

Is there something that can be done in the WDDOEXIT method? I would like to control when the application is shut down through the application itself.

Thanks

Glenn

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Please refer this thread -

/people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications

Yes, WDDOEXIT also can be used where you can write the code to close the window.

Regards,

Lekha.

former_member82844
Participant
0 Kudos

Please read the problem. I do not want to place a button on the page to close, I want to STOP the page from closing under certain circumstances when the 'X' (close) button is pressed on the browser. I am sure with the research I have done that this cannot be done but I wanted to ask the question anyways just be sure.

My users do not like the idea that they can loose the changes they are making if they close the browser window. This is how all web pages work and if you are in a page buying something then close the browser, your information is lost.... But the users rule and I need to cover all bases.

I have looked at the WDDOEXIT method but it is to late at that point and I cannot see any way to stop the close from happening.

Glenn

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Even work protect mode in the browser won't keep the user from closing the browser. Even with complex JavaScript, I don't think such a thing would be possible in most browsers. The close button in the browser is part of the surrounding application and not what is running in the browser. Its controlled by the OS interaction with the browser, not with the application interaction.

The best you could is to possible save the current context (maybe by serailizing it to XML) on the WDDOEXIT. That way you could perhaps restore at least some of their data back to the previous session after they had closed the browser window. Th eproblem being that you would have to control this by user name and couldn't account for multiple sessions being open (and subsequently closed) in parallel by the same user.

former_member82844
Participant
0 Kudos

Thomas. Thanks for the explaination. That is what I expected and have looked at varius options but in the end, you pless the close button, you are done.....

Thanks

Glenn