The moose likes HTML, CSS and JavaScript and the fly likes how to set dynamic value to a combo box? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "how to set dynamic value to a combo box?" Watch "how to set dynamic value to a combo box?" New topic
Author

how to set dynamic value to a combo box?

smyle khanna
Ranch Hand

Joined: Jan 14, 2004
Posts: 54
hi all..
i am facing problem with dynamic created combo boxes...i have 2 combo boxes..n the after the first combo box is set 4 a certain value,for tht value the second combo box gets the corresponding values in it..
my first combo box display the value but the second one doesnt take the value of first n display the list accordinly..plz help me out the code is given blow..i have used the javascript code also which was mention in sum forum..

the corresponding javascript code which gets executed on change is given blow

thanks in advance
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
The onchange event is sending back the value of the selection. The script is trying to uses that value to get it out of the array. You have the arrays named different.
I would say use this script: http://www.javascriptkit.com/script/cut183.shtml Just do not include the Go Button...
Eric
 
 
subject: how to set dynamic value to a combo box?
 
Threads others viewed
Create a box
Problem in creating dynamic combo boxes
problem in calling servlets from html
Rounding off $$ amounts
Access Data from Database By Submitting The select Values
developer file tools