Archive: Reload window on leave?


Reload window on leave?
What if I want to make some check on pageleave and I if it is true reload page?


do you want to...

A. just stay on the same page
In which case, just call "Abort" in the leave function.

B. update the page with new information
In which case, call "Abort" in the leave function and update the UI as needed. This usually means that whatever code you've got when you create the page is copied or moved to another function so that you can call it both when the page is first displayed and in your leave function.

C. actually start that page all over again.
In which case, see...
- "RelGotoPage" - http://nsis.sourceforge.net/Go_to_a_NSIS_page
or
- this thread: http://forums.winamp.com/showthread.php?t=321883
( summary of that thread: After the dialog 'closes', find out why it closed (thus determining whether this was due to 'leaving', and use GoTo to go back to where the dialog is first initialized. )


Thank YOU Animaether!
I think simple Abort I have onchange text event wich validates my data, so for now this works. May be its good to remove this check from onchange and move it to onload and reload my page, but for now this is ok :)