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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -