Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Javascript Problem, Help Needed
solankyno1
post Jan 17 2005, 04:45 PM
Post #1


Super Member
*********

Group: Members
Posts: 315
Joined: 1-October 04
From: India
Member No.: 1,377



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
CODE
<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.
Go to the top of the page
 
+Quote Post
solankyno1
post Jan 17 2005, 06:11 PM
Post #2


Super Member
*********

Group: Members
Posts: 315
Joined: 1-October 04
From: India
Member No.: 1,377



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.
Go to the top of the page
 
+Quote Post
alapidus
post Jan 17 2005, 10:07 PM
Post #3


Member [Level 1]
****

Group: Members
Posts: 74
Joined: 21-October 04
From: Connecticut
Member No.: 1,870



QUOTE(solankyno1 @ Jan 17 2005, 01:11 PM)
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.
*



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!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Delphi & Assembly Forum(2)
  2. Web Surfing- Script Needed(2)
  3. Problem Installing Sims 2 Nightlife(26)
  4. I Have A Girl Problem Here(27)
  5. Visual Basic 6.0 Help Needed(15)
  6. Problem With Page Redirect(8)
  7. Php Header Problem(11)
  8. Dvd Drive Problem(10)
  9. Remote Assistance Problem(8)
  10. Laptop Keyboard Problem(7)
  11. Skype / Xampp Port Conflict(5)
  12. Help Needed With Excel Formulas(5)
  13. We Need More Members At Ipbgaming.com(28)
  14. Sony Handycam(15)
  15. Problem Aligning In Firefox(9)
  1. Itunes Problem!(1)
  2. Help Needed: Rewritting Uris From .htaccess(0)
  3. How Many More Times Will I Have To Post About This?(11)
  4. Problem Getting Text To Align With Different Resolutions(4)
  5. Youtube People That Do Not Respect Other Opinions(7)
  6. Creating A Floating Javascript Docking Menu(1)
  7. A Problem With Ftp Clients(9)
  8. Domain Problem : This Is Important..(0)
  9. Browser Compatibility Problem With Firefox - Javascript + Css(3)
  10. Terminating Hosting Problem(1)
  11. Seeking Help With Javascript(1)
  12. Problem With My Girlfriend Family, Need Suggestions For Action(2)
  13. Logging Into Cpanel [resolved](13)


 



- Lo-Fi Version Time is now: 6th September 2008 - 06:33 PM