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

  • SEARCH
  • Home
  • 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 8746043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:07:59+00:00 2026-06-13T12:07:59+00:00

I just would like to check all my checkboxes with JQuery. These checkboxes are

  • 0

I just would like to check all my checkboxes with JQuery. These checkboxes are created with JSF.

I tried :

$("input[type=checkbox]").each( 
        function() {              
           $(this).prop('checked', true);
// OR
           $(this).attr('checked', true);
// OR         
           $(this).attr('checked', 'checked');
          alert($(this).attr('id'));
            } 
        );

nothing works…

Can JSF be the problem ? Value of these checkboxes are linked with some managed bean boolean value.

Thanks for help.

PS : my alert() function returns id of checkboxes properly and JQuery version is :

jQuery JavaScript Library v1.8.1

  • 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-06-13T12:08:00+00:00Added an answer on June 13, 2026 at 12:08 pm

    Ok, I think I have understood the problem…

    when I try this code :

    $(":checkbox").prop('checked',true);
    $("input[type=checkbox]").each( 
            function() {          
              alert($(this).prop('checked'));               
            } 
        );
    

    I have always true values but I see some checkboxes unchecked…

    So values are changed but visual stay the same. It’s because I use JSF and it’s folowwed render :

    enter image description here
    enter image description here

    This checkox is made of some CSS background etc…

    So I have to change CSS of parent div (with background…) to make this checkox checked visually since its value is already set to true.

    It was just a visual problem, not value problem.

    Thank you

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am pretty sure I cannot, but I would just like to double check
I'm just wondering on how would you check java codes like System.Out.println(hi); it should
I would like to check out Windows7 and install all of my developer programs
I have a validation class which I would like to use to check all
I have a select 'All' checkbox that I would like to be bound to
Let's say I have a checkbox search form like this: Check all that interests
I just would like to know what format and codec would use the least
I just would like to know if it is possible (and if yes how)
I have an std::vector<unsigned char> with binary data in. I just would like to
I would just like to know if there is any advantage to having a

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.