View Single Post
Old 02-06-2008, 02:12 PM   #6 (permalink)
Boogle
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 422
iTrader: 0 / 0%
Latest Blog:
None

Boogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the rough
this code should stop people from going forwards
Code:
<script type="text/javascript"> function validateSelections() { var dropDown1 = document.GetElementByID(yourDropDown1) var dropDown2 = document.GetElementByID(yourDropDown2) var sIndex1 = dropdown1.selectedIndex; var sIndex2 = dropdown2.selectedIndex; if(dropdown1.options[sIndex1].text == "" || dropdown2.options[sIndex2].text == "") { alert("Select an option from both please..."); } } </script>
Remember to give your <select></select> tags an id with yourDropDown1 and yourDropDown2 or choose your own

That works for me, but i still think you should definitly be using XML/DB to be populating menu's and PHP caters for this i am sure. However, I don't do PHP so couldn't help you with that bit.


HTH's
Boog's
__________________
Great new 'June' Javascript Framework

June Forums - Innovative JScripting

Price is what you pay... Value is what you get.

Last edited by Boogle : 02-06-2008 at 02:15 PM.
Boogle is offline   Reply With Quote