C
crjunk
I have a script notifies the user to save their changes if they try to
close the browser or leave the current page. My problem is that if
they click on the "Save Changes" button, the script executes.
Obviously, I don't want to remind the user to save their changes when
they are trying to save their changes.
Here is the original script that I have:
window.onbeforeunload = SaveChangesPrompt;
function SaveChangesPrompt() {
if ((document.ScheduleForm.txtRecordStatus.value) == "Changes Made;
Record Not Saved.")
{
return "YOUR CHANGES HAVE NOT BEEN SAVED.";
}
}
I tried adding the following to the IF statement, but it doesn't seem
to have any effect:
&& ((this.value) != "Save Changes")
Is what I'm trying to accomplish possible?
Thanks,
CR Junk
close the browser or leave the current page. My problem is that if
they click on the "Save Changes" button, the script executes.
Obviously, I don't want to remind the user to save their changes when
they are trying to save their changes.
Here is the original script that I have:
window.onbeforeunload = SaveChangesPrompt;
function SaveChangesPrompt() {
if ((document.ScheduleForm.txtRecordStatus.value) == "Changes Made;
Record Not Saved.")
{
return "YOUR CHANGES HAVE NOT BEEN SAVED.";
}
}
I tried adding the following to the IF statement, but it doesn't seem
to have any effect:
&& ((this.value) != "Save Changes")
Is what I'm trying to accomplish possible?
Thanks,
CR Junk