janim Posted August 7, 2007 Share Posted August 7, 2007 hi guys i really like this forum and a lot of thanks for you all ok i have registration page you know name email country .... but i found in the internet javascript msgs to prompt people who register if there any error like valid email and Full all fields .. this is the code <script type="text/javascript"> function setFocus(aField) { document.forms[0][aField].focus(); } function isAnEmailAddress(aTextField) { if (document.forms[0][aTextField].value.length<5) { return false; } else if (document.forms[0][aTextField].value.indexOf("@") < 1) { return false; } else if (document.forms[0][aTextField].value.length - document.forms[0][aTextField].value.indexOf("@") < 4) { return false; } else { return true; } } function isEmpty(aTextField) { if ((document.forms[0][aTextField].value.length==0) || (document.forms[0][aTextField].value==null)) { return true; } else { return false; } } function validate() { if (isEmpty("name")) { alert("Please fill your name."); setFocus("name"); return false; } if (isEmpty("Country")) { alert("Please fill your Country."); setFocus("con"); return false; } if (!isAnEmailAddress("email")) { alert(" The entered email address is invalid."); setFocus("email"); return false; } return true; } </script> i tried this in firefox and it's working 100% but in internet explorer it's prompt me to fill my country all the time i tried more than country and i told my friends to do all have same problem so who know what to do ? ??? ??? thanks for all :'( :'( Link to comment https://forums.phpfreaks.com/topic/63668-is-there-deference-between-firefox-and-internet-explorer/ Share on other sites More sharing options...
cooldude832 Posted August 7, 2007 Share Posted August 7, 2007 php forum not javascript move this to a javascript help area Link to comment https://forums.phpfreaks.com/topic/63668-is-there-deference-between-firefox-and-internet-explorer/#findComment-317303 Share on other sites More sharing options...
janim Posted August 7, 2007 Author Share Posted August 7, 2007 ok i did !! :-X Link to comment https://forums.phpfreaks.com/topic/63668-is-there-deference-between-firefox-and-internet-explorer/#findComment-317307 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.