I have a validation function and the this is the last thing it does.
[code = var mytext=document.getElementById("sizip")
if(check5(mytext,"Zip Code must be 5 digits.")==false)
{mytext.focus();return false;}
function check5(mytext,alerttxt){
var re5digit=/^\d{5}$/ //regular expression defining a 5 digit number
if (mytext.value.search(re5digit)==-1) //if match failed
alert(alerttxt);return false; ]
It will validate ok, if I do not have 5 digits, I get an error box.
But then if I click the accept button again, it puts focus back on my zip code with no error.