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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:01:15+00:00 2026-05-11T15:01:15+00:00

Here is the scenario: I have two radio buttons, 1) for a normal customers

  • 0

Here is the scenario: I have two radio buttons, 1) for a normal customers and 2) for business partners which also has a drop down control so that one of X number of business partners can be selected. When one customer type is selected the other section goes dark with the normal disabling of controls and applying CSS to get that disabled look.

What I’m striving for is that when the Radio Button, Label next to it and, in the case of the Business partner section, the drop down list are clicked is that particular section should become enabled. What I’m finding is that the when the ‘Label for’ is wrapped around the radio button and drop down list, which has its attribute disabled=true via jQuery when the opposite section is enabled, that actually clicking on the drop list doesn’t enable that section. Also the click event is not fired for the drop list which I assume is correct since its disabled state is set to true. I’ve tried using both the click event for the radio buttons and the labels but the disabled dropdown list seems to be an event handling black hole. I am using jQuery and Asp.net MVC but I’m convinced of the relevance of, at least, MVC in this case.

The radio button and label click event will fire through the disabled dropdownlist in IE7 but not Firefox3 nor Chrome browsers.

Any ideas?

<label for='CustomerRadio'>  <input id='CustomerRadio' checked='checked'          name='usertype' type='radio'         value='Customer' />Customer </label>   <label  for='BusinessPartnerRadio'>   <input id='BusinessPartnerRadio'          name='usertype' type='radio'          value='BusinessPartner' />Business Partner     <select id='businessPartnerType' name='businessPartnerType'>       <option selected='selected' value='Builder'>Builder</option>       <option value='InstallDealer'>Install Dealer</option>       <option value='RepairDealer'>Repair Dealer</option>     </select> </label> 
  • 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. 2026-05-11T15:01:16+00:00Added an answer on May 11, 2026 at 3:01 pm

    You’re absolutely right, the disabled property turns the select box into a black hole. Even the normal browser right-click Firefox context menu doesn’t work over it.

    Sounds like your intention is to re-enable the select box when its label container is clicked, so is the disabled state just for appearance’s sake? .. If so, what if you made the select box just look disabled using CSS opacity?

    <style type='text/css'>   label.disabled select { opacity: 0.6; filter: alpha(opacity=60); } </style>  <script type='text/javascript'>   $(function() {     $('div.formdiv').bind('click',function() {       $('label.disabled',this).removeClass('disabled');       $('input:radio',this).attr('checked',true);       $('div.formdiv').not(this).find('label').addClass('disabled').find('select').attr('selectedIndex',0);     }).find('label').addClass('disabled');   }); </script>  <div class='formdiv'>  <label for='CustomerRadio'>   <input id='CustomerRadio' checked='checked' name='usertype' type='radio' value='Customer' />Customer  </label> </div>  <div class='formdiv'>  <label for='BusinessPartnerRadio'>   <input id='BusinessPartnerRadio' name='usertype' type='radio' value='BusinessPartner' />Business Partner  </label>  <label>   <select id='businessPartnerType' name='businessPartnerType'>    <option selected='selected' value='Builder'>Builder</option>    <option value='InstallDealer'>Install Dealer</option>    <option value='RepairDealer'>Repair Dealer</option>   </select>  </label> </div> 

    Test page here: http://www.carcomplaints.com/test/motowilliams.html

    Seems to works okay in FF3 & I’m guessing Chrome browsers too. Unfortunately in IE7 (wish I had a nickel for every time I said that), the select box loses focus instantly if you click it directly.. something internal to IE, related to the opacity filter changing on the select object, it seems.

    Sidebar … disregarding your ‘disabled’ select box issue for a moment: even though you use the ‘for=…’ syntax on your labels, I don’t think it’s valid to have multiple form elements contained within a single label tag. If it’s valid, maybe just not a good idea. The whole idea is clicking anywhere within the label gives focus to the linked form element, so in theory, your select box (which is the 2nd form element within a label) should never gain focus. FF3 handles this correctly – if you try your code without disabling the select box, you’ll see the problem.

    Hope that helps. The div overlay suggested by the first poster might be the way to go. I thought I’d just try for an alternate solution using your same HTML code, adjusted to fix that multiple-form-element-per-label problem.

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

Sidebar

Related Questions

Here is the scenario : I have a gui which contains two buttons.Now is
Here's my scenario: I have two tables A, B which (for the sake of
Here's a scenario: I have a java front end (RCP/SWT) app which currently has
Here is my scenario: I have two MySQL tables: Categories (columns: id, category) Items
Here's the scenario: You have two seperate websites that exist in different environments (I.E.
Here's my scenario. I have two classes ClassA and ClassB . ClassB inherits ClassA
Here is the scenario: I have two Activities. Lets name them Activity A and
here's my scenario: I have three projects: two DLLs and one console application, let's
i need to implement following scenario, here i have two horizontalScrollViews the upper scrollView
Here's my scenario: I have made a regular DLL in C++ (using VS2008) which

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.