Page 1 of 1

Not sure if this is CSS or JS: background color of textbox

Posted: Tue Sep 10, 2002 4:35 pm
by sinewave
any way to change the background color of a textbox depending on whether it is enabled or disabled?

I have a javascript function that will enable it or disable it depending on whether a checkbox is checked or not...but it doesnt "look" disabled...i'd like people to KNOW they cant access it... ie. make the background gray
Any advice would be great...

Posted: Tue Sep 10, 2002 4:41 pm
by Takuma
I should do it auto but you can do this

Code: Select all

document.FORMNAME.TEXTBOXNAME.style.backgroundColor='grey';

Posted: Wed Sep 11, 2002 11:42 am
by sinewave
thanks...did what i was hoping for.