By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,247 Members | 1,165 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,247 IT Pros & Developers. It's quick & easy.

how would i validate this select box using javascript

P: 1
How would I validate this select box using JavaScript?

Expand|Select|Wrap|Line Numbers
  1. <form action="pizza/data.php" method="post" name="form" 
  2.           onsubmit="javascript:return form_validation();"/>
  3.  
  4. <select name="team[]" id="s" multiple="multiple">
  5. <option value="sox" name="one">sox</option>
  6. <option value="celtics" name="two">celtics</option>
  7. <option value="patriots" name="three">patriots</option>
  8. </select>
  9.  
  10. </form>
Apr 28 '11 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
What kind of validation? That at least one option should be selected?
May 12 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.