View Full Version : onUnload use with form submission

07-23-2002, 02:23 AM
I have set up a form which reload automatically when the user hits another page. I set up an OnBlur event with a focus(); function and this works well. This is the easy bit!!

I am also trying to make the user fill in the form, and not be able to leave until it is submitted. This is a little cruel, but the feedback is necessary(compulsory really!!). Keep in mind that there is validation scripts for text fields and radio buttons as weel coded into this document.

I believe there is a function (similar to what is below) that can be set up which would then call as an onUnload event in the <body> tag.

function ReOpen()
alert("Please complete the evaluation form!");

with the body tag below

<body onUnload="ReOpen()">

This doesnt seem to be working very well with IE 5, but NN6 seems to work this quite well. I have been having trouble incorporating this script in with the validatoin scripts as well.


mmasci :(