/    Sign up×
Community /Pin to ProfileBookmark

Enable button w/ multiple criteria

I want to enable a button if all apply:
1. a check box is checked
2. a drop down is a particular value
3. a text field has a specific variable

How do I do this? Also, for step #3, is there a way to enable the button on the completion of the proper variable? So, in other words, when the users enters the proper phrase, without “on blur” is there a way to check for the proper variable and enable the button?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@fulton_savageDec 01.2005 — you need to write a javascript function that checks for all those conditions, and execute it on the onChange property of the check box, the drop down, and the text field.

so maybe

function checkItems() {

if checkbox....

if drop down..

if text field...

}

and your controls

<input type="text" onchange="checkItems()"...

i think onchange is what you want for the other question too
×

Success!

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