...

View Full Version : onUnload use with form submission



mmasci
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()
{
window.open("evaluationform.htm","evaluation","left=100,top=100,width=600,height=400")
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.

Help!

mmasci :(



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum