Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating from a dropdown box to a listbox???

Status
Not open for further replies.

shawn876

Programmer
Feb 19, 2004
17
US
Hi I have a dropdown box with GroupNames.
I need the form to work when
a groupName is selected to popualte the listbox with values.
If the GroupName is not selected then Do not populated anything for the listbox.
Please help Thanks
 
I think you will need to use something like <select name="name" 'onFocus="PopulateListBox()">

You will then need to write the PopulateListBox() function to do what it says.
 
Actually, thinking about it, you may need to put 'onClick="PopulateListBox(var)"' in each of the <OPTION> tags.

var is a unique variable which can be used to determine the values to appear in the listbox.
 
To add to matty's post - i would suggest using onchange in the select tag as the event handler, also this is a javascript question, try the javascript forum
forum216

and I have written a faq about dynamically changing select boxes.
faq216-4766
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top