Changing disabled textbox fontcolor without using readonly

Go To StackoverFlow.com

1

We have a huge ASP.Net web application in C#. It is now required that the fontcolor of the text in disabled textboxes be changed. The problem is that most of the textboxes have the "disabled" attribute set and not "readonly". If I change the attribute to "readonly", i will have to modify all the places in the javascript code where checks like

if(document.getElementByID('Element1').disabled == 'true') etc exist. And these checks exists at 1000s of places. If start changing all these i will be trapped in a downward spiral, moving away from humanity, disapperaing into an abyss never from which i may be able to come out. Please help me on this.

I should add that i need it to work only for IE8. Thanks.

2012-04-04 07:58
by NKaul


0

Unfortunately, you can not change font color of disabled text box in IE8.

2012-05-04 18:17
by Dima


1

The following worked for me:

input[disabled] {
    background-color: GrayText !important; 
    color: White !important;
}
2012-05-09 19:07
by Neha
This does not change the font color - Saravana 2013-09-26 11:08
Ads