<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello list,</FONT></DIV>
<DIV><FONT face=Arial size=2>This might be better as a tip, but it is on topic 
here.</FONT></DIV>
<DIV><FONT face=Arial size=2>I have noticed a lot of code lately that 
manipulates the ccs attributes. There is something that we tend to forget ( I 
spent all yesterday tracking this bug down in my own code), you can apply a 
stylesheet in 4 ways: inline, embedded , linked or through a&nbsp;script 
(typically JavaScript). When you apply a stylesheet by creating it through a 
script (which is what happens when you manipulate the style attribute without it 
being specifically applied in a css stylesheet) expect quirky behavior when you 
attempt to manipulate it again. Huh?</FONT></DIV>
<DIV><FONT face=Arial size=2>Here is my example,</FONT></DIV>
<DIV><FONT face=Arial size=2>I have a input box that I changed the border color 
to red if the data did not validate. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>layerRef = eval(doc + errField + forstyle);//<FONT 
face=Arial size=2>'errField' is the passed in id input field that failed to 
validate</FONT>
<DIV>&nbsp;layerRef.borderColor = "red"; // just created the style attribute 
borderColor</FONT></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>the input box looked like this:</FONT></DIV>
<DIV><FONT face=Arial size=2>&lt;input type="text" name="thislname_y_lname" 
id="thislname_y_lname" &gt;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>the border would turn red every time , no 
problem.</FONT></DIV>
<DIV><FONT face=Arial size=2>so I went nuts when after the from was revalidated 
and I tried to change the border back to gray, IE would tell me that there was 
no such property.&nbsp; After I changed the input box to:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT face=Arial size=2>&lt;input type="text" name="thislname_y_lname" 
id="thislname_y_lname" style="border-color: gray;"&gt;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><EM>I&nbsp;had no more problems( at least with that 
part of the script)</EM> </FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;so I would recommend playing it safe, any css 
element that you want to manipulate through scripting make sure you set it in a 
stylesheet. As with this thread. set the left properties in a stylesheet 
&nbsp;#someid {position: absolute; left: 0px ;}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Hope this helps </FONT></DIV>
<DIV><FONT face=Arial size=2>Robert</FONT></DIV>
<DIV><FONT face=Arial size=2><A 
href="mailto:vreeland@studioframework.com">vreeland@studioframework.com</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT>&nbsp;</DIV></DIV></BODY></HTML>