/    Sign up×
Community /Pin to ProfileBookmark

hiding and show the fieldset

hi

I am very new to javascript.I need to hide a filedset depending upon the checkbox selection.
I have attached code for this.the fieldset contains some non null and isNaN validation.those should be disabled too.

how can I do that??

kind regards

[upl-file uuid=5923c727-5ca3-4a6d-ab1d-f474e54adf9e size=18kB]billing.txt[/upl-file]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@DracoMerestAug 28.2011 — <input type="checkbox" name="garment[]" value="jacket" onclick='document.getElementById("jacket").style.display=(this.checked)?"block":"none";'/>

This event, added to the checkbox, changes the display attribute of the object

with an ID of 'jacket' to either BLOCK or NONE dependant on the state of the

check box.

display=(test checkbox) ? "true value" : "false value"

Now you need to decide if the jacket fieldset is to be open by default or

closed. If open then you will need to specify that the relevant check box is by

default checked. Otherwise, the default state of the jacket fieldset should be

hidden by adding display:none to the STYLE attribute.

The same applies to the PANT checkbox and fieldset.
Copy linkTweet thisAlerts:
@csayantanauthorAug 29.2011 — i need a print button too.how do i print this form along with database uodate??any idea will be appreciable
×

Success!

Help @csayantan 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.5,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...