digiti0
05-29-2003, 08:49 AM
Hi,
I have the following onSubmit code to check for blank fields. It displays the alert and then focuses for a split second on the blank field. Then the cursor disappears and it seems that the fields below the blank field are re-displayed, like the page is reloading. Any ideas on why the cursor is not staying in the blank field once it gets there?
Thanks!
function CheckInput(form)
{
if (isempty(trim(form.last_nme.value)))
{
alert("Last name is a required field.");
form.last_nme.focus();
return false;
}
}
I have the following onSubmit code to check for blank fields. It displays the alert and then focuses for a split second on the blank field. Then the cursor disappears and it seems that the fields below the blank field are re-displayed, like the page is reloading. Any ideas on why the cursor is not staying in the blank field once it gets there?
Thanks!
function CheckInput(form)
{
if (isempty(trim(form.last_nme.value)))
{
alert("Last name is a required field.");
form.last_nme.focus();
return false;
}
}