solankyno1 0 Report post Posted January 17, 2005 dear friends, I have made a Form page and I am using javascript for validating it . I don't want the textboxes to be blank. My code is working well in Internet Explorer but not in Firefox. the page is at http://www.webdirectory.co.nr/Emailform.html the code is as following <script type="text/javascript"> <!-- function formsubmit(){ if(formme.fromname.value==""){ alert("PLEASE ENTER YOUR NAME"); formme.fromname.focus(); return false;} if(formme.fromemail.value==""){ alert("PLEASE ENTER YOUR EMAIL"); formme.fromemail.focus(); return false;} if(formme.message.value==""){ alert("PLEASE ENTER WEBSITE WITH DESCRIPTION"); formme.message.focus(); return false;} return true;} //--></script> Please help what is wrong with my code. Thanks in advance. Share this post Link to post Share on other sites
solankyno1 0 Report post Posted January 17, 2005 So at last the problem was solved by me. I was not adding the word document before every form element. I mean I was writing form.input.value="" but i was supposed to write document.form.input.value="" . Internet Explorer was ignoring this problem it proves how standard the IE is. Share this post Link to post Share on other sites
alapidus 0 Report post Posted January 17, 2005 So at last the problem was solved by me. I was not adding the word document before every form element. I mean I was writing form.input.value="" but i was supposed to write document.form.input.value="" . Internet Explorer was ignoring this problem it proves how standard the IE is. 41659[/snapback] actually, it just proves that you have to be very specific if you want all browsers to render your code correctly! there are many different levels other than 'document' in javascript. browsers never like to assume and they almost always do it badly! more and more users are switching over to firefox because a lot of them (including myself) believe that it renders code way better! you'll just have to learn to code to both browsers! Share this post Link to post Share on other sites