Click here to Skip to main content
13,043,491 members (52,708 online)
Rate this:
Please Sign up or sign in to vote.
I have a check box and checkboxlist as
<s:checkbox name="modProcessVO.byWeeklyCal" id="week">Days of the Week</s:checkbox>
<s:checkboxlist list="{'Mon','Tue','Wed','Thur','fri','Sat','Sun'}" name="modProcessVO.weeklyCal" id="days"/>

So initially all checkboxes for the list should be diabled and when i check the checkbox for 'Days of the Week', the checkboxlist for the 7 days should be enabled. Pls help me on this
Posted 1-May-12 0:53am
Updated 1-May-12 1:03am
Sandeep Mewara 1-May-12 8:43am
What have you tried so far? Where are you stuck?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

hi johny

try this

// First way

// Second way

then enable or disable the checkbox list using id

Happy coding .... :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Try following:

if ($('#weekCheckBox').is(':checked')){
$("[id*=CheckBoxList1] input:checkbox").prop('checked', true);

For more information to set checkboxlist items in jquery, check following:

ASP.NET CheckBoxList Operations with jQuery[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 15 Jun 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100