Archive: Back button and page Leave function


Back button and page Leave function
Hi,

I'm assigning a custom leave function to my pages (both standard and custom pages), but the leave function is never called when the user presses the back button to load the previous page ???


Nope.

-Stu :)


So there is no way to detect a Back button press at all ?


If it's a custom page you can by Pop $R0 after the InstallOptions plugin call. $R0 will contain "back" if the user clicks the back button.

As for detecting for other pages, you need to set a temp variable to e.g. "1" in a pages' PRE function, then in the previous pages' PRE function check if that temp variable is "1". This will tell you that the user has clicked back. Obviously you need to reset the value to "0" again in both pages' LEAVE functions.

-Stu


Testing "back button"
Hi

Can you post the code showing how to detect "Back button" by poping $R0. I am using only a single custom page.

best regrads

Joseph