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 9022977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:38:59+00:00 2026-06-16T05:38:59+00:00

I have to develope one form which contains table with section and sub-section.On click

  • 0

I have to develope one form which contains table with section and sub-section.On click event of section,sub section should be select/deselcet.And also on uncheck of each sub-section my section should be uncheck .I have to do this thing on row click as well as checkbox click.http://imgboot.com/images/sureshdasari/selectdeselectcheckboxes.gif this is what i want but inside this image only checkbox click working i want the same action on row click also.Is there any one have idea then please help me .If it is easier using jquery then also help for me.

thanks in Advance.

Here is my code link http://pastebin.com/J5bnXbN2 i want same things on row click

  • 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-16T05:39:01+00:00Added an answer on June 16, 2026 at 5:39 am

    See this : http://jsfiddle.net/RtcBR/3/

    $(document).ready(function() {
    var flag = false;
    var flag2 = false;
    $("#checkall").click(function(event) {
        $('input:checkbox:not(#checkall)').attr('checked', this.checked);
        if ($(this).attr("checked")) {
            $("#tblDisplay").find('tr:not(#chkrow)').each(function() {
                $(this).css("background-color", "#FC9A01");
            });
        }
        else {
            $("#tblDisplay").find('tr:not(#chkrow)').each(function() {
                $(this).css("background-color", "#FFF");
            });
        }
        flag2 = true;
    });
    
    $('input:checkbox:not(#checkall)').click(function(event) {
        if ($("#checkall").attr('checked') && !this.checked) {
            $("#checkall").attr('checked', false);
            $(this).closest('tr').css("background-color", "#ffffff");
        }
        if (!$("#checkall").attr('checked') && this.checked) {
            if ($('input:checkbox:not(#checkall)').filter(":not(:checked)").length === 0) {
                $("#checkall").attr('checked', true);
            }
        }
        if (this.checked) {
            $(this).closest('tr').css("background-color", "#FC9A01");
            flag = true;
        }
        if (!this.checked) {
            $(this).closest('tr').css("background-color", "#ffffff");
            flag = true;
        }
    });
    
    $('tr').click(function() {
    
        if (!flag) {
            var checkbox = $(this).find('td:first').find('input');
            if (checkbox.is(':checked')) {
                checkbox.attr('checked', false);
                checkbox.closest('tr').css("background-color", "#FFF");
            } else {
                checkbox.attr('checked', true);
                checkbox.closest('tr').css("background-color", "#FC9A01");
            }
        }
        flag = false;
    });
    $('tr#chkrow').click(function() {
        if (!flag2) {
            var checkbox = $(this).find('th:first').find('input');
            if (checkbox.is(':checked')) {
                checkbox.attr('checked', false);
                $('tr').find('td:first').find('input').attr('checked', false);
                $("#tblDisplay").find('tr:not(#chkrow)').each(function() {
                $(this).css("background-color", "#FFF");
            });
            } else {
                checkbox.attr('checked', true);
                $('tr').find('td:first').find('input').attr('checked', true);
                $("#tblDisplay").find('tr:not(#chkrow)').each(function() {
                $(this).css("background-color", "#FC9A01");
            });
            }
        }
        flag2 = false;
    });
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in my project i have one registration form which is developed in C#.net.to this
i have application with one form, which i developed in c#. I would like
I have developed one application in iPhone which contains videos. Now I want to
I had developed one website purely in HTML .I have my form with fields
One business jar which have been developed by us is present in war. but
I have a simplest form of an application, in which I am showing a
I have a form which can populate from 1-100 elements based on a user's
I have a link on my page, which calls a login form inside Fancybox.
I have developed one login form in Android. I have used validation here. I
In my application I have a Form that for one of the top level

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.