Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 454203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:14:51+00:00 2026-05-12T22:14:51+00:00

I have 5 checkboxes in each row. The first one is ‘ALL’. I am

  • 0

I have 5 checkboxes in each row. The first one is ‘ALL’. I am trying to see if any of the others are disabled. So, if somebody clicks on ‘ALL’ checkbox, I need to make sure the disabled ones are not checked. This is what I have:

("input[name^=all_]").each(function() {
var input = $(this);   
var name = input.attr('name');    
var num = /\d+$/.exec(name)[0]; 
$(this).click(function() {

if ($('"#G"+num').attr('disabled',false)) {            
$("#G"+num).attr('checked', $("#all_"+num).is(':checked'));
}
if ($('"#E"+num').attr('disabled',false)) {         
$("#E"+num).attr('checked', $("#all_"+num).is(':checked'));
}
if ($('"#W"+num').attr('disabled',false)) {
$("#W"+num).attr('checked', $("#all_"+num).is(':checked'));
}
if ($('"#S"+num').attr('disabled',false)) {
$("#S"+num).attr('checked', $("#all_"+num).is(':checked'));
}
});

});

The thing is, the disabled ones still gets checked once I click on ‘ALL’. what am i doing wrong? thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:14:51+00:00Added an answer on May 12, 2026 at 10:14 pm

    this works:

     if ( !$("#G"+num).is(':disabled') ) {             
    $("#G"+num).attr('checked', $("#all_"+num).is(':checked'));
    }
    if ( !$("#E"+num).is(':disabled')) {            
    $("#E"+num).attr('checked', $("#all_"+num).is(':checked'));
    }
    if ( !$("#W"+num).is(':disabled') ) {
    $("#W"+num).attr('checked', $("#all_"+num).is(':checked'));
    }
    if (!$("#S"+num).is(':disabled')) {
    $("#S"+num).attr('checked', $("#all_"+num).is(':checked'));
    }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table style page with rows. Each row has a checkbox. I
I have a form with thousands of checkboxes, and when one is checked, I
I am trying to delete a row using the DataTables plugin. First I don't
I have 3 check boxes in each row of 8 total rows. I want
I have a list of checkboxes like this: <g:each in=${mylist} var = item >
I have an HTML table in which the first column's cells each contain a
I'm currently dynamically building an asp:table which contains checkboxes these checkboxes have a CheckChanged
I have a group of checkboxes that I only want to allow a set
I have a form with checkboxes and then text to the right of the
I have a series of checkboxes on an HTML page and I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.