This shouldn't be difficult, but I'm having problems after trying styles, class, etc.
I have a input type=text and I want to change the background color based on the option button selected by the user. The option button calls a javascript with an if statement. This is, logically where I would change the text background color.
I can get as far as:
"document.frm1.txtMessage" but can find the correct access to the background color property.
I tried writing a sytle class that set background-color then set document.frm1.txtMessage.class = class-name
No good.
Direct calls like document.frm1.txtMessage.style doesn't work either.
What kind of syntax do I need to access and change this property?
Thanks for any suggestions.
Tom T
I have a input type=text and I want to change the background color based on the option button selected by the user. The option button calls a javascript with an if statement. This is, logically where I would change the text background color.
I can get as far as:
"document.frm1.txtMessage" but can find the correct access to the background color property.
I tried writing a sytle class that set background-color then set document.frm1.txtMessage.class = class-name
No good.
Direct calls like document.frm1.txtMessage.style doesn't work either.
What kind of syntax do I need to access and change this property?
Thanks for any suggestions.
Tom T