/    Sign up×
Community /Pin to ProfileBookmark

Hey everyone , I have a university assignment

Which i am stuck on a few things for javascript , can anyone please help me out ??

Appropriate input devices that allow multiple selections of these
items. Selection or non selection of values for these items set
the display rules for its subsections as follows:
• B – Already selected and input devices b1 to b5
activated.
• C – Initially not selected and subsections c1 to c11 are
inactive. If C is selected in subsections are activated.
• D – Initially not selected and subsection d1 is inactive. If
D is selected d1 becomes active.
• E – Initially not selected and subsections e1 to e3 are
inactive. If E is selected in subsections are activated.

If anyone actually responds i will gladly tell them more about it ?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@Ay__351_eJun 03.2013 — 

<html>
<head>
<script type="text/javascript">
// http://www.w3schools.com/jsref/jsref_split.asp
// http://www.w3schools.com/html/tryit.asp?filename=tryhtml_checkbox
// http://www.w3schools.com/jsref/dom_obj_checkbox.asp
// http://www.w3schools.com/jsref/prop_checkbox_checked.asp
// http://www.w3schools.com/jsref/prop_checkbox_disabled.asp
// http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_checkbox_disabled
// http://www.w3schools.com/tags/att_input_disabled.asp
// http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_disabled

function tercih (bu) {
var A = bu.value.split(/,/g);
var el, i;

for(i=0; i<A.length; i++) {
el= document.getElementById(A[i]);
el.disabled = !bu.checked;
el.checked = bu.checked;
}
}
</script>
</head>
<body>

<input type="checkbox" name="c" value="c1,c11" onclick="tercih( this )">C<br>
<input type="checkbox" name="c1" id='c1' value="" disabled>C1 <br>
<input type="checkbox" name="c11" id='c11' value="" disabled>C11 <br>
</body>
</html>

×

Success!

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