combo box validation

RigEssedeSics

New Member
content this is the java script code.for validating combo boxes..the validation is not workin properly..i needed ur help..plz help me..if the user doesnt select it has to show an alert box for all the tree\[code\]<script type="text/javascript">function checkseats() { if (!document.getElementsByName("seats")[0].selectedIndex == 1) { alert("Select No of Seats"); return false; } return true;}function checkmovie() { if (document.getElementsByName("movie")[0].selectedIndex == 2) { alert("Please select Movie from the list"); return false; } return true;}function checkdate() { if (document.getElementsByName("date")[0].selectedIndex == 3) { alert("Please select Date from the list"); return false; } return true;}function validate() { checkdate(); checkseats(); checkmovie();}</script>\[/code\]
 
Back
Top