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

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
sinewave
Forum Commoner
Posts: 41
Joined: Tue Sep 10, 2002 4:35 pm
Location: Canada

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

Post 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...
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

I should do it auto but you can do this

Code: Select all

document.FORMNAME.TEXTBOXNAME.style.backgroundColor='grey';
sinewave
Forum Commoner
Posts: 41
Joined: Tue Sep 10, 2002 4:35 pm
Location: Canada

Post by sinewave »

thanks...did what i was hoping for.
Post Reply