posted 22 years ago
HI,
Where are you going to get the options to populate the list with? What type of page is this? Is this script server-side or client-side?
Without more information it's a bit difficult to help you. Anyway here's a basic scenario that might help you:
The basic idea would be to assign values to the list box at page construction time, so you will need to have your list of retrievable values at that time.
Lets imagine you have your values in an object called 'values' (could be an array, a collection,...) and another object that contains the names corresponding to those values called 'names'
Then simply use a for loop like this:
Hope that helps,
------------------
Terry Doyle
Sun Certified Programmer for Java 2 Platform
Raising Flares debut album 'Ignition' out now
http://www.raisingflares.com
Terry Doyle <br />SCPJ 1.4 , SCWCD , SCMAD(Beta)