C
crjunk
I'm working with a script that uses the OnBeforeUnload event. If the
user has made changes to a record and has not saved the record, the
script will inform the user and give them a chance to go back and save
it. From what I understand IE and FireFox 0.9 and above recognive this
event. These are the only two browser that I currently have to test
with.
What happens if the user has a browser that does not support this?
Will the script simply not run or will an error be thrown?
window.onbeforeunload = SaveChangesPrompt;
function SaveChangesPrompt() {
if ((document.ScheduleForm.txtRecordStatus.value) == "Changes Made;
Record Not Saved.")
{
return "You have attempted to leave this page without saving. Press
Ok continue WITHOUT saving or Cancel to go back and save your work.";
}
}
This script isn't necessary, but it would be nice to inform the user
that they have not saved their work.
Thanks,
CR Junk
user has made changes to a record and has not saved the record, the
script will inform the user and give them a chance to go back and save
it. From what I understand IE and FireFox 0.9 and above recognive this
event. These are the only two browser that I currently have to test
with.
What happens if the user has a browser that does not support this?
Will the script simply not run or will an error be thrown?
window.onbeforeunload = SaveChangesPrompt;
function SaveChangesPrompt() {
if ((document.ScheduleForm.txtRecordStatus.value) == "Changes Made;
Record Not Saved.")
{
return "You have attempted to leave this page without saving. Press
Ok continue WITHOUT saving or Cancel to go back and save your work.";
}
}
This script isn't necessary, but it would be nice to inform the user
that they have not saved their work.
Thanks,
CR Junk