Gossamer Forum
Home : Products : DBMan : Customization :

Show/hide drop down menus depending on selection

Quote Reply
Show/hide drop down menus depending on selection
I have 3 fields: Genre, band_rock and band_rap.
In the field Genre i have Rock and Rap (in the actual db i have more but this is for simplicity) as choices.
At the moment the search pages displayed all 3 drop down boxes, but i only want it to show 2 at any one time.
E.G. if the user selects rock from the Genre menu i want band_rock menu to appear on the page and the same for band_rap.

Is this possible? I'm guessing that i'll need to add some javascript in somewhere.
Quote Reply
Re: [manic] Show/hide drop down menus depending on selection In reply to
To the best of my knowledge, if you want the second menu to be based on the selection in the first WITHOUT SUBMITTING the search back to Perl, then yes javascript.

If you are willing to make the user submit twice, ie select Genre - submit, select band - submit, then not needing javascript.

Consider the possibilty of making links to each Genre. Since the user must be starting on some page somewhere, just make links for each Genre, perhaps each could have its own cool icon, then the links offer the menu of bands.
Quote Reply
Re: [joematt] Show/hide drop down menus depending on selection In reply to
hmm.. i think i omitted to say in my first post that there is also a couple of other selection boxes with the search. So making direct links wont be an option.

Edit: just seen LoisC's sticky, makes sense really.
sorry for posting in the wrong forum.

Last edited by:

manic: Jun 13, 2003, 2:41 AM
Quote Reply
Re: [manic] Show/hide drop down menus depending on selection In reply to
Another user was working on something like this, and while there were problems, there was quite a bit of information (most of which I did not understand, but anyway) here is a link. There is a link to a "working" javascript and the original source is listed.

http://www.gossamer-threads.com/...i?post=239963#239963

Rock on!
Quote Reply
Re: [joematt] Show/hide drop down menus depending on selection In reply to
I'll take a look at it, thanks :)