Hi All,
I have a form with multiple text boxes. I want to have one validation
routine, and, if something fails, I'd like to put the focus in that
text box.
So, how can I 'remember' which text box I came from, so I know which to
send the focus back to? They all have different names, but I do not
want to code something like this for every text box:
function datevalidation( entered, alertbox) {;
with (entered) {;
if (value==\"?\");
{if (alertbox!=\"\" ) {alert(alertbox );} return false;};
else {return true;};
};
};
if (emailvalidatio n(Email1,\"Ille gal E-mail\")==false) {Email1.focus() ;
return false;};
Any suggestions?
Thanks.
I have a form with multiple text boxes. I want to have one validation
routine, and, if something fails, I'd like to put the focus in that
text box.
So, how can I 'remember' which text box I came from, so I know which to
send the focus back to? They all have different names, but I do not
want to code something like this for every text box:
function datevalidation( entered, alertbox) {;
with (entered) {;
if (value==\"?\");
{if (alertbox!=\"\" ) {alert(alertbox );} return false;};
else {return true;};
};
};
if (emailvalidatio n(Email1,\"Ille gal E-mail\")==false) {Email1.focus() ;
return false;};
Any suggestions?
Thanks.
Comment