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: 249 Time: 10:54 - Mar 17, 2011
maxio
Just paste this and try to fix it please: <html> <head> <title>Exam entry</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.examnumber.value=="") { msg+="You must enter the exam number \n"; document.ExamEntry.examnumber.focus(); document.getElementById('examnumber').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="examnumber">Exam Number</td> <td><input name="examnumber" type="text" size="4" /></td> </tr> <tr> <td>Exaination 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.
This question has not yet been answered.
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
How to confirm radio buttons in javascript?
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