C
cgrohowski
I have a script that detects form changes and, if detected, fires off
a return value for the pages onbeforeunload event to show a dialog to
the user confirming that they really want to leave the page (this
project is IE6+ only). I also have an onsubmit event that disables
buttons on a submit so the user does not click buttons twice (this
causes havok in JSF). When the user is presented with the
onbeforeunload dialog and hits cancel, the onsubmit method is *still*
called, even though the form wasn't truly submitted. I have searched
high and low for a solution, or a way to tell what button was pressed,
but have found nothing so far. Has anyone run into a similar
situation and have a solution or a place to look for one? Any help is
much appreciated.
Thanks,
Charles
a return value for the pages onbeforeunload event to show a dialog to
the user confirming that they really want to leave the page (this
project is IE6+ only). I also have an onsubmit event that disables
buttons on a submit so the user does not click buttons twice (this
causes havok in JSF). When the user is presented with the
onbeforeunload dialog and hits cancel, the onsubmit method is *still*
called, even though the form wasn't truly submitted. I have searched
high and low for a solution, or a way to tell what button was pressed,
but have found nothing so far. Has anyone run into a similar
situation and have a solution or a place to look for one? Any help is
much appreciated.
Thanks,
Charles