We help IT Professionals succeed at work.
Get Started

Checkboxes - disable all that are in an array or comma delimited list

BILL Carlisle
Last Modified: 2012-05-11
Hi All,
I want to disable checkboxes that have an id from an array or comma delimited list using JQuery.
Thanks, Bill
<input id="P2_IERS_0" name="p_v16" value="2901" type="checkbox"><label for="P2_IERS_0">ETP</label></td><td>
<input id="P2_IERS_1" name="p_v16" value="3007" type="checkbox"><label for="P2_IERS_1">AMAI</label></td><td>
<input id="P2_IERS_2" name="p_v16" value="2902" type="checkbox"><label for="P2_IERS_2">AIN</label></td><td>
<input id="P2_IERS_3" name="p_v16" value="2903" type="checkbox"><label for="P2_IERS_3">AT</label></td></tr>
<input id="P2_IERS_4" name="p_v16" value="2904" type="checkbox"><label for="P2_IERS_4">ACW</label></td><td>
<input id="P2_IERS_5" name="p_v16" value="326" type="checkbox"><label for="P2_IERS_5">Auson</label></td><td>

<input id="P2_IERS_6" name="p_v16" value="2905" type="checkbox"><label for="P2_IERS_6">ASW</label></td><td>
<input id="P2_IERS_7" name="p_v16" value="327" type="checkbox"><label for="P2_IERS_7">COAT</label></td></tr>

Open in new window

Watch Question
Distinguished Expert 2020
This problem has been solved!
Unlock 3 Answers and 9 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE