html - Javascript onchange different in IE and FireFox -
when onchange event in ie returns false, ie focus stays on input box. in firefox focus moves next field regardless.
html:
input name="seminar_donation" type="text" id="seminar_donation" onchange="return checktotal(this);"
javascript:
function checktotal(inputbox) { if (isnan(parseint(inputbox.value))) { alert("please enter digits 0-9"); inputbox.focus(); return false; } return true; }
in ie don't need inputbox.focus() unfortunately not appear in firefox retain focus on errant input box. how can firefox stay on input box?
settimeout('document.getelementbyid("seminar_donation").focus()',1);
Comments
Post a Comment