/    Sign up×
Community /Pin to ProfileBookmark

More than one option selected?

All,

I have a multiple-select form which I want to serve dual purpose. Therefore, I want to be able to identify whether more than one option has been selected for one function. Rather than iterating through all (possibly thousands) of options, is there a way to quickly identify this as with “document.forms.mainform.elements.server.length” or something similar?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@AlienDev211Jan 10.2008 — Anything is possible. Not sure what you are talking about, but everything is possible. You would have to be more specific for me.
Copy linkTweet thisAlerts:
@toicontienJan 10.2008 — You're stuck with iterating through all the OPTIONs.
Copy linkTweet thisAlerts:
@vdubjunkieauthorJan 10.2008 — That's what I was afraid of. I guess it will still probably be very quick. Thanks.
×

Success!

Help @vdubjunkie 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.7,
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,
)...