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: 11:08 - Apr 11, 2008
zamro
I need to be able to validat drop <select> menus text feilds and radio button all in one function. So far I have been able to validate the <select> menus and the text feilds but i am still having trouble witht he radio buttons. heres the code I have so far. <html> <head> <title></title> <script type="text/javascript"> //check to make sure text feilds are not empty function validateForm() { if (document.application.fname.value == "") { alert("This field is empty."); //Informs user of empty field document.application.fname.focus(); return false; } if (document.application.lname.value == "") { alert("This field is empty."); //Informs user of empty field document.application.lname.focus(); return false; } if (document.application.cmail1.value == "") { alert("This field is empty."); //Informs user of empty field document.application.cmail1.focus(); return false; } if (document.application.cmail.value == "") { alert("This field is empty."); //Informs user of empty field document.application.cmail.focus(); return false; } if (document.application.college.value == "0") { alert("This field is empty."); //Informs user of empty field document.application.college.focus(); return false; } if (document.application.age.value == "0") { alert("This field is empty."); //Informs user of empty field document.application.age.focus(); return false; } if (form.application.act.value == "") { alert("This field is empty."); //Informs user of empty field form.application.act.focus(); return false; } } </script> <body> <h1>Computer Programmer application</h1> <h2> Apllication For What ever I Think Of Using It For</h2> <form name="application" action="http://www.waukesha.k12.wi.us/iqa/formTe... method="get" onsubmit="return validateForm()"> First name: <input type="text" name="fname" /> <br /> Last name: <input type="text" name="lname" /> <br><br> E-Mail <input type="text" name="cmail1" /> <br /> confirm E-mail <input type="text" name="cmail" /> <br><br> <select name="college"> <option value ="0">Years In College</option> <option value ="1">0</option> <option value ="2">1</option> <option value ="3">2</option> <option value ="4">3</option> <option value ="5">4</option> <option value = 6">5+</option> </select> <br> <br> <select name="age"> <option value ="0">select your age</option> <option value ="age1">5-10</option> <option value ="age2">11-15</option> <option value ="age3">16-20</option> <option value ="age4">21-25</option> </select> <br><br> <h2>My Favorite Activity Is</h2> <input type="radio" name="act" value="1">Biking<br> <input type="radio" name="act" value="2">Sports<br> <input type="radio" name="act" value="3">V-Games<br> <input type="radio" name="act" value="4">Sleeping<br> <h2>My Favorite Food Is</h2> <input type="radio" name="food" value="1">pizza<br> <input type="radio" name="food" value="2">burgers<br> <input type="radio" name="food" value="3">mac&cheese<br> <input type="radio" name="food" value="4">subs<br><br> <input type=submit value=submit> <input type=reset value=reset> </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
Hi is there a way to retrieve the loop count in XSLT
how do repair this problem: every times i opened my laptop it will suddenly n...
How i get the hp pavilion dv6-3054tx laptop bottom base assembly as a sparepa...
I don't have AOL browser but privacy scan shows hundreds of files/cookies fro...
wireless keyboard has stopped working
need validation controller for textbox in java
You have 100 characters to use
Rank
Expert
Points
1.
10279
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