3 replies [Last post]
b3zra1y
Offline
newbie
Last seen: 12 years 27 weeks ago
Timezone: GMT-4
Joined: 2008-06-25
Posts: 4
Points: 0

Hello:

Using IE 6, I have several ' disabled="disabled")
readonly (html--> readonly="readonly")

If an input tag is either readonly OR disabled, I need to gray out the background color.

I thought that this might work, but it does not:
------------------
input{
background-color:expression((this.disabled==true)?'#E3E3E3':'');
background-color:expression((this.readOnly==true)?'#E3E3E3':'');
}
------------------

However, if I use just one of these at a time, that expression is evaluated and works. Perhaps I need a more advanced expression that can check either state in one shot.

But I don't know how that's done. :shrug:
ANY ADVICE ?
thnx!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 1 week ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

background-color:expression((

background-color:expression((this.disabled==true)?'#E3E3E3': (this.readOnly==true)? '#E3E3E3' : '#000000');

Not sure if that works, seldom use MS expressions except for IE6 min/max widths

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

b3zra1y
Offline
newbie
Last seen: 12 years 27 weeks ago
Timezone: GMT-4
Joined: 2008-06-25
Posts: 4
Points: 0

yep - that work'd Thanks

yep - that work'd
Thanks !

(as you noted, i believe this works in IE only)

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 1 week ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Should only be needed for

Should only be needed for IE6 as IE7 does support attribute selectors, just not sure to what degree. All modern browsers should have no problem achieving what you require through the use of attribute selectors.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me