cancel
Showing results for 
Search instead for 
Did you mean: 

Save popup when exit the IE page

Former Member
0 Kudos

Hello all,

I have the following problem. I have a window with several views and different input fileds filled with values that mus be saved in some tables. When the user exists the IE page without saving the corresponding values I want to create a popup in which I want him to ask if he want the values to be saved before he exits the window. If he doesn't wants to save the values he will return to another initial window. I know, I should use a yes no cancel popup and if the user presses cancel he will also return to the windowin question. What I do not know is how do I catch the exit event of the IE exit button to register all these functionalities to it?

I've tried placing my code inside the wddoexit method in the main view of the window, but I know that once this method is reached all the controllers would be already lost and therefore i receive an error. How should I further proceed? Can you please help me?

Best Regards,

Mihai Dipsan 

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can place an html code in an iframe which is stored in bsp application page. You couldnt find iFrame component visually, bu you can still add it to page by code. In the html page place a javascript. When user tries to close page, javascript will ask user. For example javascript code you can use keywords for Google: "javascript are you sure you want to close this page"

Answers (1)

Answers (1)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Just use a flag in save button when saving is done. When it comes to the page, clear the flag.When going out of the screen, I assume some button will be pressed. There check the flag and depending on the flag, use popup.