Forum Moderators: phranque

Message Too Old, No Replies

Need to create linked jump menus. Help!

         

slydog

4:32 am on Jun 25, 2003 (gmt 0)

10+ Year Member



I'm trying to create linked jump menus total of 2. To be more specific, I need first menu to have car makes and once the user selects certain make the second menu should give options to choose models and then to link that to another web page. Couldn't figure it out. Does anybody know how to do this using Dreamweaver?

BlobFisk

10:01 am on Jun 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, slydog!

You can do this using JavaScript and arrays. This is something that you will more than likely have to code by hand - I'm not sure if Dreamweaver has an extension for it or not though.

The logic would be:

  1. Create an array for each sub-category, which would contain the elements within the second drop-down list.
  2. Write a function that populates a select list with the array contents (both name and value).
  3. Use the onChange event on your select list to dynamically populate the second drop-down list.

I have recently written a function to do this for a project I was working on, so if you run into trouble just shout!

This may be better off in the HTML and Browsers Forum. You may wish to contact Oilman (see above for the mod!) and ask him to move it.

Pricey

12:41 pm on Jun 25, 2003 (gmt 0)

10+ Year Member



Bang on.

Top marks BlobFisk :) You can also hide your sub menus using span with display:none and and ID set. Then JS onclick to call the menu. You can make it so that clicking on the button a sceond time will hide the menu again.

I have this style menu featured on my web site. YOu are welcome to use the code from it :)

slydog

2:16 pm on Jun 25, 2003 (gmt 0)

10+ Year Member



Thanks for your responses guys. Bad news - I don't know much about manual programming. I thought maybe there's some kind of online manual where I can just copy and paste and fill in my own data. I could do that :). And I couldn't find these types of menus on your site, Pricey.

BlobFisk

2:23 pm on Jun 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can't urge you more to dive in and try and work your way through it... In the long run, figuring these things out is very beneficial.

Try a Google search on:

multiple drop down onChange javascript

This throws back a few nice examples and tutorials.