Dwayne Epps wrote:
::
:: I call the function with the form onSubmit event. There are 4 form
:: fields that aren't required for input and when that field is reached
:: the script is bypassed and submits the form information without
:: checking the remainder of the form input fields. I thought I could
:: use the continue statement to move to the next required input field
:: and continue checking the form, but that isn't working. This is how
:: I was trying to move to the next required form input field:

function checkform ( form ) {
var missing = 0;
var msg = "The following items need to be filled in:";
if (form.first_name.value == "") {
msg += "\nfirst name";
missing = 1;
}
if (form.vehID.value == "") {
msg += "\nvehicle ID number";
missing = 2;
}
if (missing > 0) {
alert(msg);
missing = 1 ? form.first_name.focus() : form.vehID.focus();
return false;
}
else {
return true;
}
}

--
David Powers
*******************************************
No-nonsense reviews of computer books
[url]http://japan-interface.co.uk/webdesign/books.html[/url]
Save 10% on TopStyle CSS Editor
*******************************************