Select Categories Below
Advertisement
Start Your Own Q&A Site
Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.
Status: Open Points: 125 Time: 06:42 - Mar 17, 2011
adamfry1
I have a problem,javascript validation form put this in and check it out yourself then you will see my problem: <html> <head> <title>Entry Form</title> <script language="javascript" type="text/javascript"> function validateForm() { var result = true; var msg=""; var examnumberlimit = 4 if (document.ExamEntry.name.value=="") { msg+="You must enter your name \n"; document.ExamEntry.name.focus(); document.getElementById('name').style.color="red"; result = false; } if (document.ExamEntry.subject.value=="") { msg+="You must enter the subject \n"; document.ExamEntry.subject.focus(); document.getElementById('subject').style.color="red"; result = false; } if (document.ExamEntry.subject.value=="") { msg+="You must enter the exam number \n"; document.ExamEntry.subject.focus(); document.getElementById('examnumber1').style.color="red"; result = false; } if(document.ExamEntry.examnumber.value.length==examnumberlimit) { } else { msg+=" Your exam number must be four digits long "; document.ExamEntry.examnumber.focus(); document.getElementById('examnumber').style.colour="red"; result = false; } if ( ( document.ExamEntry.option[0].checked == false ) && ( document.ExamEntry.option[1].checked == false ) ) { alert ( "Please choose your entry level" ); valid = false; } if(msg==""){ return result; } { alert(msg) return result; } for (var i=0; i < document.ExamEntry.ExamLevel.length; i++) { if (document.ExamEntry.ExamLevel[i].checked) { level = document.ExamEntry.ExamLevel[i].value; } } ConfirmMSg = confirm(level) if (ConfirmMSg== true) { } else { result = false; return result; exit() } } </script> </head> <body> <h1>Exam Entry Form</h1> <form name="ExamEntry" method="post" action="success.html"> <table width="50%" border="0"> <tr> <td id="name">Name</td> <td><input type="text" name="name" /></td> </tr> <tr> <td id="subject">Subject</td> <td><input type="text" name="subject" /></td> </tr> <tr> <td id="examnumber1">Exam Number</td> <td><input name="examnumber" type="text" size="4" /></td> </tr> <tr> <td>Examination Level</td> <td><input type="radio" name="option" value="GCSE"> GCSE <br> <input type="radio" name="option" value="AS" > AS <br> <input type="radio" name="option" value="A2"> A2 </td> </tr> <tr> <td><input type="submit" name="Submit" value="Submit" onClick="return validateForm();" /></td> <td><input type="reset" name="Reset" value="Reset" /></td> </tr> </table> </form> </body> </html>
Categories:
Add Categories
When adding more than one category, separate them with commas.
ggggg
Date:: Mar 15, 2012
Time:: 10:57
its wrong
cheek1541
Date:: Mar 25, 2012
Time:: 09:28
dude it doesn't even work as instructed,I have the same task and I've completed it for GCSE you've got yours a bit messed up.
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
Somthing wrong with my javascript form please help!
Microsoft VB Script compilation error '800a03fa' - 'Expected Wend'
Need help with enabling/disabling only few text fields in the form
You have 100 characters to use
Rank
Expert
Points
1.
10354
2.
6493
3.
5596
4.
4848
5.
3487
6.
2840
7.
2770
8.
2303
9.
1820
10.
917
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software