• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Javascript DropDowns

The Donut

2[H]4U
Joined
Jan 28, 2003
Messages
3,122
Hey guys,

I'm not a javascript expert by any means, infact quite the opposite. However, I need to do something that I cannot do and was hoping for some help.

It's in relation to my other thread which is here.

I need three drop downs, that populate each other based upon the previous. For example:

Printer Brand -> Printer Series -> Printer Model
ie: Canon -> PiXMA -> iP4200

Then it would redirect to a URL using the values such as http://url.com/brand/series/model.html

I'd be willing to compensate anyone for their time with their assistance.

If you feel you could help, either reply here, email me (thedonut at gmail dot com) or contact me on MSN Messenger (luke at lukebarber dot ca).

Thanks!
 
I think the css play website http://www.cssplay.co.uk/ probably has an example of what you're looking for. on the examples page you can view the source to see what the css is and what should be included on the page.
 
I believe you are talking about form selects, rather than menus, but it is difficult to infer from your question.

Anyways, if it is form selects, you may want to look into jquery and using ajax calls to populate the sub-selects.

See the jquery plugin: selectcombo
http://code.google.com/p/jqueryselectcombo/
 
I believe you are talking about form selects, rather than menus, but it is difficult to infer from your question.

Anyways, if it is form selects, you may want to look into jquery and using ajax calls to populate the sub-selects.

See the jquery plugin: selectcombo
http://code.google.com/p/jqueryselectcombo/

Yes, I am talking about form selects. Sorry, I should have been more specific.

I'll take a look at jquery and see if it'll function as it should on the ecommerce system I'm using (it's restrictive, at times).

Thanks
 
There is no reason to use jquery, you can do this completely client side by using an array with javascript.

I will post an example here tomorrow for you as I have to sleep now :)
 
True, jquery just makes some things like the ajax calls easier. You could do it all client-side, but when you start getting thousands of options based on the previous selects, you will want to be doing this with ajax calls, so you aren't downloading all the options for every possible combination when loading the page.
 
No need to get overzealous, keep it simple and stay away from jquery or ajax for now. I wouldn't assume the added layer of complexity is needed until (@least) these 2 are answered:

1) How many options (and sub options of each) are you working with?
2) Possible that you have thousands of options that you want to avoid downloading?...if this is the case (I'm assuming it's not, but...) w/out knowing much about what you're doing, I'd argue that's a bad design. I'd rethink that first before throwing an added layer of complexity into the picture as a means of masking the bad design.
 
There is no reason to use jquery, you can do this completely client side by using an array with javascript.

I will post an example here tomorrow for you as I have to sleep now :)


Now this I'll be waiting for! Please don't forget!

I've toyed with the ones from CSS play as well as others (such as suckerfiush and sonofsuckerfish) but none of them quite give me the base interaction I'm looking for; and they are usually nothing more than over-glorified, expanding, colorful menus. Which, they're great, but I'm interested in something more dynamic for some projects I'm working on.

Btw, anyone interested, I'm not looking for thousands or even hundreds of options. Most of the base links/buttons/menu will be single to double. But two or three of the links/buttons/menus I wanted to expand into three layers with updated "recent" content; if possible. Something like Media > Downloads >> Video >> Pictures >> and then those broken into other sub-categories like by date, topic or something. Yeah, it may be conceptual, unsure if it'll work. Very much interested if some of you could give a (relatively) newbie a good direction to go in though!
 
No need to get overzealous, keep it simple and stay away from jquery or ajax for now. I wouldn't assume the added layer of complexity is needed until (@least) these 2 are answered:

1) How many options (and sub options of each) are you working with?
2) Possible that you have thousands of options that you want to avoid downloading?...if this is the case (I'm assuming it's not, but...) w/out knowing much about what you're doing, I'd argue that's a bad design. I'd rethink that first before throwing an added layer of complexity into the picture as a means of masking the bad design.

There won't be thousands of options. But, there will be hundreds. I have worked with a dropdown before that was javascript, but it's only using Brand > Model, which made the list bigger - I want it broken down into series too. The original JS was around 49kb.
 
c'mon, i've been waiting for that code silently for days now ..... i just didn't want to raise my hand for it
 
Back
Top