Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you change the bgColor for a form element in Netscape??

Status
Not open for further replies.

liefr

Programmer
Nov 9, 1999
11
US
I am doing maintenance on a system using Netscape Communicator 4.73. The system is TCL with Javascript. I would like to change the bgColor when a field on my form is left out or fails an edit but using document.form.field.bgColor causes a javascript error. I found a comment in Doc javaScript that indicates the style.backgroundColor only works in IE. Does anyone know how this is done in Netscape?
 
I believe you have to reference it like so:<br><br>document.divID.bgColor = &quot;red&quot;<br><br>if you are a layer down eg.<br>&lt;div id=divID name=divName&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;span id=&quot;spanID&quot; name=&quot;spanName&quot;&gt;&lt;/span&gt;<br>&lt;/div&gt;<br><br>This would be referenced like so:<br><br>document.divID.document.spanName.bgcolor = &quot;red&quot;<br><br>For more help, see:<br><br><A HREF=" TARGET="_new">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top