Fingerprint
Programmer
I'm working on a very large form that has to be written in client-side javascript and HTML, and I thought I'd nearly finished.
Then I was asked if after a validation error pop-up, the program could move to the question, AND focus on one of the fields associated with it, but I can't work out if it's possible. I can do either:
OR
But both doesn't seem to work! Does anybody have any ideas?
Then I was asked if after a validation error pop-up, the program could move to the question, AND focus on one of the fields associated with it, but I can't work out if it's possible. I can do either:
Code:
if (!validRequired(form1.jobtitle))
{
alert ('Q1: Please enter a "Job Title".');
window.location='#Quest1';
return false;
}
OR
Code:
if (!validRequired(form1.jobtitle))
{
alert ('Q1: Please enter a "Job Title".');
form1.jobtitle.focus();
return false;
}
But both doesn't seem to work! Does anybody have any ideas?