troubleshooting Question

Checkbox selection not working with using <label> ???

Avatar of proteam4
proteam4 asked on
Web Languages and StandardsJavaScriptCSS
1 Comment1 Solution269 ViewsLast Modified:
Hi,

I have the code as follows.

<label class="labelHover" id="lbl252053" onMouseOut="document.getElementById('lbl252053').className = 'labelHover'" onmouseover ="document.getElementById('lbl252053').className = 'labelHover_hover'">
         <input type="checkbox" name="cb252053" id="cb252053lbl252053" value="Y" />
         16 and under
</label>

Here i want to do is, when any user hover their mouse over the label and checkbox then the bgcolor of label will change, for that i have used mousein and out caz in IE the css hovering was not working. All is working fine in all browsers, when user clicks on the label then my checkbox got selected. BUT in IE6.0 when i click on my abel then its not selecting the checkbox. To select the checkbox in IE6.0 i have to click on checkbox BOX otherwsie its not selecting it.

Please tell me how can i solve this problem.

Thanks
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros