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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:03:27+00:00 2026-05-14T06:03:27+00:00

I am looking for a way for users to select one of the two

  • 0

I am looking for a way for users to select one of the two options (strength or weakness) for a list of qualities.

for eg:

                   strength     weakness  not applicable
1. Communication 
2. Punctuality
   ...

Radio button lets me select either a strength or weakness. However, I want the user to check only those qualities that apply and if a user accidentally selects a quality there is no way to undo the selection for a radio button unless there is a third radio button called not applicable or have the user re-enter the page. I was wondering if there is a way to be able to get the flexibility of a checkbox (check / uncheck) in addition to disabling or enabling the other checkbox when one of them is checked or unchecked instead of using three radio buttons.

I don’t think I have seen this behavior before so wondering if there is a more elegant way of doing this. I am open to other ideas to get the same functionality. Using a checkbox as radio button was just a thought.

thanks much.

  • 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-14T06:03:27+00:00Added an answer on May 14, 2026 at 6:03 am

    Solution based on javascript

    function SetSel(elem)
    {
      var elems = document.getElementsByTagName("input");
      var currentState = elem.checked;
      var elemsLength = elems.length;
    
      for(i=0; i<elemsLength; i++)
      {
        if(elems[i].type === "checkbox")
        {
           elems[i].checked = false;   
        }
      }
    
      elem.checked = currentState;
    }​
    
    <input type="checkbox" class="chkclass" onclick="SetSel(this);" />
    <input type="checkbox" class="chkclass" onclick="SetSel(this);" />
    <input type="checkbox" class="chkclass" onclick="SetSel(this);" />
    <input type="checkbox" class="chkclass" onclick="SetSel(this);" />
    

    Working Demo

    Solution based on jQuery

    $(function(){
        $("input:checkbox.chkclass").click(function(){
          $("input:checkbox.chkclass").not($(this)).removeAttr("checked");
          $(this).attr("checked", $(this).attr("checked"));    
        });
    });​
    
    <input type="checkbox" class="chkclass" />
    <input type="checkbox" class="chkclass" />
    <input type="checkbox" class="chkclass" />
    <input type="checkbox" class="chkclass" />
    

    Working Demo

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

Sidebar

Related Questions

I am looking for a way to allow users to upload Outlook emails to
I have been looking for a way to allow users to manually override geolocation
I am looking for a way to login/logout users with DWR, so that I
I'm looking for a way to make it easy for technically unsophisticated users to
I am looking for a way to get a twitter users userid via their
I'm looking for a way to store color skin options in a JComboBox and
I am looking for a way to allow users without the Office 20XX package
I am Looking for a way to fetch the data between two date, for
I'm looking for a way to pull user (eg. inetOrgPerson) information in a federated
I am looking for a way to allow a user on my web site

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.