Connecting Tech Pros Worldwide Help | Site Map

urgent code required simple selection list validation

  #1  
Old March 18th, 2009, 01:11 PM
Newbie
 
Join Date: Feb 2009
Posts: 27
hi experts
Expand|Select|Wrap|Line Numbers
  1. <head>
  2. <script type="text/javascript">
  3. </script>
  4.   </head>
  5. <body>
  6. <form>
  7. <select name="team" id="mylist" >
  8. <option></option>
  9. <option>north</option>
  10. <option>south</option>
  11. <option>east</option>
  12. <option>west</option>
  13. </select>
  14.  
  15. <select name="assignedto" id="mylist1" >
  16.     <option></option>
  17.     <option>rose</option>
  18.     <option>lily</option>
  19.     <option>lotus</option>
  20.     <option>basil</option>
  21.     <option>iris</option>
  22.     <option>champa</option>
  23.     <option>orchid</option>
  24.     <option>sonki</option>
  25.     </select>
  26. </form>
  27. </body>
  28. </html>
if the team north is selected from the listbox(mylist) i want only rose and lily to be populated in the second listbox ie(mylist1) and if south is selected lotus and basil should only be populated.

kindly somebody help me out in this code,it can be a javascript or php.
i have not written any function inside the javascript

Last edited by Markus; March 18th, 2009 at 03:16 PM. Reason: Added [code] tags.
  #2  
Old March 19th, 2009, 12:37 AM
TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 893
Provided Answers: 4

re: urgent code required simple selection list validation


As-is, PHP will not help because by the time the user has access to the page and can choose a team, the page is already sent and is out of the realm of PHP and into Javascript territory. Have a go making a javascript function to do that or post the question in the javascript forum... Or wait for a moderator to move this to the javascript forum.
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
while selecting a column in the listbox related colum to be populated in other listbo ahilar12 answers 9 March 28th, 2009 07:08 PM