Mark Taylor
09-18-2000, 03:05 PM
Hi,
I'm creating a page that has several list boxes, let's call these A1, A2,
A3...A9. Depending on what is selected in A1, a list of items appears in
list box B1, A2 corresponds to B2 etc. I'll refer to the B list boxes as
Bx from here forward I don't want to have to go back to the server to retrieve
the item list for each Bx list box everytime a selection is made in it's
corresponding Ax list box because there are nine different A list boxes that
the user will select from when they use the page, that would get frustrating.
Here's a simple example using one of the nine list boxes, well call it Musical
Preferences:
ListBox A (Musical Preferences):
Jazz
Country
Alternative
HipHop
If I select Jazz in list box A I want ListBox B to display:
List Box B (Artists)
Miles Davis
John Coltrane
Charles Mingus
Thelonius Monk
Duke Ellington
etc
If I select Alternative in List Box A I want ListBox B to display:
List Box B (artists)
The Cure
Simple Minds
Depeche Mode
The Smiths
etc
Get the idea?
The only way I can think of to handle this is to set up some hidden text
areas so that the "lists" that will be placed in a B list box can be retrieved
via javascript when the user selects an item in an A list box. In the old
school, we would call this a kludge solution. Is there a better way?
Many Thanks
Mark
I'm creating a page that has several list boxes, let's call these A1, A2,
A3...A9. Depending on what is selected in A1, a list of items appears in
list box B1, A2 corresponds to B2 etc. I'll refer to the B list boxes as
Bx from here forward I don't want to have to go back to the server to retrieve
the item list for each Bx list box everytime a selection is made in it's
corresponding Ax list box because there are nine different A list boxes that
the user will select from when they use the page, that would get frustrating.
Here's a simple example using one of the nine list boxes, well call it Musical
Preferences:
ListBox A (Musical Preferences):
Jazz
Country
Alternative
HipHop
If I select Jazz in list box A I want ListBox B to display:
List Box B (Artists)
Miles Davis
John Coltrane
Charles Mingus
Thelonius Monk
Duke Ellington
etc
If I select Alternative in List Box A I want ListBox B to display:
List Box B (artists)
The Cure
Simple Minds
Depeche Mode
The Smiths
etc
Get the idea?
The only way I can think of to handle this is to set up some hidden text
areas so that the "lists" that will be placed in a B list box can be retrieved
via javascript when the user selects an item in an A list box. In the old
school, we would call this a kludge solution. Is there a better way?
Many Thanks
Mark