/    Sign up×
Community /Pin to ProfileBookmark

mutually exclusive drop down lists

Hello,
I need to make 4 drop downs which display 5 values each (” “, “1”, “2”, “3”, “4”).

When one of the combos is selected I need each of the [i]other[/i] 3 lists to remove this value from the list of available answers.

Also, when a combo is changed back to a ” ” value, the former selected value should then be re-added to each of the [i]other[/i] 3 combo boxes.

The function is to have 4 objects for the user to order in preference 1-4.

If the user rates the first object a “1” then the other objects should only show values of ” “, “2”,”3″ and “4”.

I’ve seen scripts that create conditional menus but they all appear to just go from “left to right” if you know what I mean. If Item 3 is changed, I want to change lists 1,2 and 4, not just 4 like most scripts seem to do.

Any help is appreciated.

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@AdamBrillJul 19.2003 — Take a look at the attached code. I hope that helps. ?

[upl-file uuid=5e4f7b1c-c827-43de-8508-8443e7e84f6d size=702B]dynamic_selectbox.zip[/upl-file]
Copy linkTweet thisAlerts:
@brittonljauthorJul 19.2003 — Absolutely perfect.

I've been banging my head on the wall for hours!

Thanks much ?
Copy linkTweet thisAlerts:
@AdamBrillJul 19.2003 — Good, I'm glad I could help. ?
Copy linkTweet thisAlerts:
@ellipJun 20.2012 — hi, i have the same problem, but my ddls are bound to DB and taking items from there....may be someone have a suggestion how to make it happen..

thanks,

elli
Copy linkTweet thisAlerts:
@007JulienJun 20.2012 — There is no need of drop-down lists to permute or rearrange objects...

See this page (with mouse drag and drop) or this variant (with touchs or clicks) for mobile. In the first case a cookie retain the order. It could be read with PHP to store is value in a DB. In the second case a form is build to store the items with there values...

It facilitates the polls very useful to ask the children if they prefer their father, their mother or the sauerkraut ?
×

Success!

Help @brittonlj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...