M
Martin
I have the following function in the onchange event of several text
boxes. If the user enters an invalid number the alert displays. I
would like to return the user to that same field after he closes the
alert but setting the focus as I'm doing here doesn't do it (instead,
the focus goes to the next field).
Any suggestions as to hwo I can make this work?
Thanks.
function checkIt(fldID,maxValue,btnID){
if (document.getElementById(fldID).value > maxValue)
{alert('Invalid Lane Number');
document.getElementById(btnID).disabled=true;
document.getElementById(fldID).focus;}
else
document.getElementById(btnID).disabled=false;
}
boxes. If the user enters an invalid number the alert displays. I
would like to return the user to that same field after he closes the
alert but setting the focus as I'm doing here doesn't do it (instead,
the focus goes to the next field).
Any suggestions as to hwo I can make this work?
Thanks.
function checkIt(fldID,maxValue,btnID){
if (document.getElementById(fldID).value > maxValue)
{alert('Invalid Lane Number');
document.getElementById(btnID).disabled=true;
document.getElementById(fldID).focus;}
else
document.getElementById(btnID).disabled=false;
}