I usually use onfocus/onblur: <INPUT TYPE="text" NAME="name" VALUE="" SIZE=30 onfocus="style.backgroundColor='gray'; style.color='white'" onblur="style.backgroundColor='white'; style.color='black'">
Dave -----Original Message----- From: Matthew R. Small [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 10:57 AM To: CF-Talk Subject: OT: CSS and dynamically changing classes Hi everybody, I have a form where a text input box become available for use only if a certain slection is made. What I want to do is have the color of the text box be grey if it is not available and normal color (which is purple in my case) if it is available. I can handle the css which makes it grey, and the javascript which makes it non-focusable until the correct selection is made, but I need it to change color. I tried (as an educated guess) If (select.selectedIndex == 8) { form.nameoftextbox.class = "sameclassasrest";} and If (select.selectedIndex == 8) { form.nameoftextbox.style = "sameclassasrest";} but neither worked for me. Can I do this and how? Thank you, Matt Small ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

