Problem: When setting the background color style on a field the field style reverts to non-XP 2D style.
Target browser: IE 5.5/6.X
Problem OS: WindowsXP
I am working on an application that has some dynamic field interaction. Field2 is disabled unless field1 is populated. This works fine. Disabled fields do not visually show the user it is disabled. Here is an example:
<input type="text" id="field2" disabled>
So I added style background color to make it look disabled:
<input type="text" id="field2" disabled style="background:#eeeeee;">
This brought on a problem with WindowsXP. In pre-XP Windows, the fields are all 3D text fields unless you change it with CSS. In XP the default is XP's style (2D) unless you change it wil CSS. But when you change the background like I did above, IE does not change only the background, but the whole style reverts back to the 3D style. Run this in IE on XP to see the difference:
<input type="text" disabled>
<input type="text" disabled style="background:#eeeeee;">
Of course the true solution is to force all fields to conform to your own style. Then I have total control. Unfortunately this is not an option right now.
Here is a snippet that I have that shows this happening:
<html><body>
<input type="text" id="field2"><br>
<input type="button" value="3D return!" onclick="field2.style.cssText='';"><br>
<input type="button" value="Gimmie 2D!" onclick="field2.style.background='#eeeeee';"><br>
</body></html>
Is there any way to keep the XP style (2D look) of the text field, but change the background color? In other words change only the background color.
Kindon
Target browser: IE 5.5/6.X
Problem OS: WindowsXP
I am working on an application that has some dynamic field interaction. Field2 is disabled unless field1 is populated. This works fine. Disabled fields do not visually show the user it is disabled. Here is an example:
<input type="text" id="field2" disabled>
So I added style background color to make it look disabled:
<input type="text" id="field2" disabled style="background:#eeeeee;">
This brought on a problem with WindowsXP. In pre-XP Windows, the fields are all 3D text fields unless you change it with CSS. In XP the default is XP's style (2D) unless you change it wil CSS. But when you change the background like I did above, IE does not change only the background, but the whole style reverts back to the 3D style. Run this in IE on XP to see the difference:
<input type="text" disabled>
<input type="text" disabled style="background:#eeeeee;">
Of course the true solution is to force all fields to conform to your own style. Then I have total control. Unfortunately this is not an option right now.
Here is a snippet that I have that shows this happening:
<html><body>
<input type="text" id="field2"><br>
<input type="button" value="3D return!" onclick="field2.style.cssText='';"><br>
<input type="button" value="Gimmie 2D!" onclick="field2.style.background='#eeeeee';"><br>
</body></html>
Is there any way to keep the XP style (2D look) of the text field, but change the background color? In other words change only the background color.
Kindon