I don't understand what you mean to put a variable in the onBlur event. Sure
I can set a local variable and now I know that something is happened. But
when the person clicks the checkbox, and the page is sent to the server, the
onunload event is called which fires, it sees that there has been a change
so it asks the user if they want to lose the changes then reloads itself.
Are you saying though - check for the variable in the onunload and if the
variable is set, don't do anything because that means that the page isn't
really going to unload - and then reset the variable ? I'm not sure how to
do that.
TIA - Jeffrey.
"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:uY**************@TK2MSFTNGP12.phx.gbl...
UJ wrote: I've got a page where users can make changes (enable and disable some
checkboxes.) I need to have it so that if they have made changes and go
away from the page, they will get prompted if they want to lose their
changes before the changes are actually saved. So I've got code that adds
a javascript window.confirm on unload to stop them. Problem is, the check
boxes are run at the server which means whenever somebody clicks one, the
page thinks it's unloading to it prompts them which isn't what I want. I
only want them to be prompted when they are going elsewhere.
Anybody have any suggestions on what I can do to fix this?
TIA - Jeffrey.
tie a local variable to the onBlur event of the checkbox
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com