Click here to Skip to main content
15,914,350 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi Guys,

I have a problem when trying to make check box disabled.

The functionality is working fine and the checkbox is disabled, But in the IE UI it doesn't look dimmed as on firefox or google chrome

that is my code and it works fine:

JavaScript
$("#<%=chkTrueAnsRequired.ClientID%>").change(function () {
                var chkAllowText = $("#<%=ChkAllowText.ClientID%>");
                if (this.checked) {
                    chkAllowText.attr("disabled", true);
                }
                else {
                    chkAllowText.removeAttr("disabled");
                }
            });



So My problem is to make it dimmed on the IE UI.
Any Ideas?
Posted
Updated 30-Jan-14 2:19am
v3
Comments
_ProgProg_ 30-Jan-14 8:12am    
Any Ideas?

Its Important
_ProgProg_ 30-Jan-14 8:23am    
can i add any css to check box to look dimmed?
it's urgent!!!

1 solution

Just do this CSS trick.You can set background-color here.

C#
input[disabled] {
...
/* CSS here */
...
}



Check this link Too : set the disabled CheckBox color

Check This one : JSFiddle
 
Share this answer
 
v3
Comments
_ProgProg_ 30-Jan-14 8:47am    
id did the following and it didn't work
chkAllowText.css("background-color", 'gray');
_ProgProg_ 30-Jan-14 8:57am    
please note that the checkbox have no text
so i want to style itself to be dimmed
thanks in advance
Sampath Lokuge 30-Jan-14 9:03am    
Please check this link : http://jsfiddle.net/BTaZ8/1/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900