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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:51:23+00:00 2026-05-26T17:51:23+00:00

I have to make mutually exculsive checkboxes. I have come across numerous examples that

  • 0

I have to make mutually exculsive checkboxes. I have come across numerous examples that do it giving example of one checkbox group.
One example is at http://blog.schuager.com/2008/09/mutually-exclusive-checkboxes-with.html.

In my case, I have many checkbox groups on the same page, so I want it to work like this example.
An asp.net codebehind example is here, but I want to do it in client side code.

How can I do this in JavaScript?

i have decided to use the ajax mutually exclusive checkbox extender.
The solutions given so far are basically based on radio buttons.
This link really helped me..http://www.asp.net/ajax/videos/how-do-i-use-the-aspnet-ajax-mutuallyexclusive-checkbox-extender

  • 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-26T17:51:23+00:00Added an answer on May 26, 2026 at 5:51 pm

    Using Mutual Checkboxes when there is Radio button is a bad idea but still you can do this as follows

    HTML

    <div>    
        Red: <input id="chkRed" name="chkRed" type="checkbox" value="red" class="checkbox">
        Blue: <input id="chkBlue" name="chkBlue" type="checkbox" value="blue" class="checkbox">
        Green: <input id="chkGreen" name="chkGreen" type="checkbox" value="green" class="checkbox">
    </div>
    
    <div>
        Mango: <input id="chkRed" name="chkMango" type="checkbox" value="Mango" class="checkbox">
        Orange: <input id="chkBlue" name="chkOrange" type="checkbox" value="Orange" class="checkbox">
        Banana: <input id="chkGreen" name="chkBanana" type="checkbox" value="Banana" class="checkbox">
    </div>
    

    Jquery

    $('div .checkbox').click(function () { 
                     checkedState = $(this).attr('checked');
                      $(this).parent('div').children('.checkbox:checked').each(function () {
                          $(this).attr('checked', false);
                      });
                      $(this).attr('checked', checkedState);
    });
    

    And here is fiddle

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

Sidebar

Related Questions

I have to make a schema for an XML format that's already being used.
Following is the code snippet that I have: // Make Auto release pool NSAutoreleasePool
I'm trying to make two XML attributes to be mutually exclusive. How can one
I have make one procedure which has in and out parameter: delimiter // DROP
I have make a one small image and in which one detail page is
I have make user control and inside that user control takes two buttons name
i have make user control and inside that user control takes two buttons name
I have to make an application that recognizes inside an black and white image
I have make on demo that list all contact from contact Uri in that
I have make a script. That set li items on different positions on the

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.