C
crjunk
Can someone show me what I am doing wrong with this function? I'm
still having problems with javascript syntax. I'm sure this is some
kindergarten mistake that I've made. IE is telling me that a semicolon
is expected at the end of the IF statement.
*NOTE: I have left out my "setFocus()" function from this post (See
Body OnLoad).
<HEAD>
<TITLE> Maintain MPR </TITLE>
<script type="text/javascript" language="JavaScript">
<!--
function SaveChangesPrompt() {
If ((document.ScheduleForm.txtRecordStatus.value) == "Changes Made -
Record Not Saved.") {
confirm("You have attempted to leave this page. If you have made
any changes to the fields without clicking the Save button, your
changes will be lost. Are you sure you want to exit this page?") ;
}
}
// -->
</script>
</HEAD>
<BODY onload='setFocus()'; onunload='SaveChangesPrompt()'>
Thanks for your patience!
Sincerely,
CR Junk
still having problems with javascript syntax. I'm sure this is some
kindergarten mistake that I've made. IE is telling me that a semicolon
is expected at the end of the IF statement.
*NOTE: I have left out my "setFocus()" function from this post (See
Body OnLoad).
<HEAD>
<TITLE> Maintain MPR </TITLE>
<script type="text/javascript" language="JavaScript">
<!--
function SaveChangesPrompt() {
If ((document.ScheduleForm.txtRecordStatus.value) == "Changes Made -
Record Not Saved.") {
confirm("You have attempted to leave this page. If you have made
any changes to the fields without clicking the Save button, your
changes will be lost. Are you sure you want to exit this page?") ;
}
}
// -->
</script>
</HEAD>
<BODY onload='setFocus()'; onunload='SaveChangesPrompt()'>
Thanks for your patience!
Sincerely,
CR Junk