/    Sign up×
Community /Pin to ProfileBookmark

a checkbox response

Ok, where to begin…I have a form where an Insured individual fills out required info…a couple of the fields invoke a javascript routine (highlight) that gives a pale yellow background to the textbox, alerting the applicant to their current position (in those fields where position need not be indicated, a 2nd javascript routine is invoked, highlight2, which sets the textbox background to white)…so far so good…I’ve included a checkbox that invokes a javascript routine which fills in the info fields if the insured is also the owner…also so far so good…what I’m trying to do, is in the case where the checkbox is unchecked (meaning the owner is not also the insured, I’d like selected textboxes to highlight the pale yellow…I thought the following would work:

function SetFKolor() {
if (document.forms[0].copy.checked == true)
onFocus=”highlight(event)”;
}
else {
onFocus=”highlight2(event)”;
}
}
</script>

onClick=”SetFKolor(event)”

No luck…Javascript Help please!

Thanks,
Ron

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

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