<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>Yes, that would be my preferred way also.<BR>
<BR>
Although I think this is the same bull differently packed and "borrowed" from first release of IE 4.0.<BR>
This is <FONT color=#000000>a call of element </FONT>extracted from document members, the same mistake IE4.0 did.<BR>
<BR>
The argument:<BR>
Now why do I like your approach more, than:<BR> <FONT>document.getElementById</FONT>("MyBlock").style.padding = ...;<BR>
of course, only if: <BR>
<FONT>var</FONT> oDiv = document.getElementById("MyBlock");<BR>
is declared as <FONT color=#000000>global</FONT> variable. Otherwise there is no benefit!<BR>
<BR>
That's because every time the script calls the object, the browser has to iterate through all document objects once again.<BR>
But this inefficiency/mistake was immediately corrected before the end of 1997.[with <FONT>IE4.01 patch</FONT>].<BR>
Even if you could, -back then, also declare:<BR>
<FONT> <FONT>var</FONT> oDiv=document.all</FONT><FONT>.<FONT>MyBlock;</FONT></FONT><BR>
to later use:<BR>
oDiv.style.something...;<BR>
compensating for document collection call overhead. <BR>
But seeing that this is now inefficient for coders, they've immediately introduced<BR>
the <FONT color=#000000>direct object reference</FONT>. <BR>
MyBlock.style.something...;<BR>
Something W3C never did! -I wonder why?!<BR>
<BR>
<FONT><FONT color=#ffffff><FONT>For your eyes only:</FONT></FONT></FONT><BR>
<FONT color=#ffffff>But no need to wonder, because as "object call through collection" , -the direct object reference might still be, at least </FONT><BR>
<FONT color=#ffffff>an "Intellectual Property" of Microsoft. But this one is not that easy to modify so W3C left it out until at least next year.</FONT><BR>
<FONT color=#ffffff>Because (I'm not very sure about this) but Intellectual property rights expire in a decade.</FONT><BR>
<FONT color=#ffffff></FONT> <BR>
<FONT color=#ffffff>"object reference" method in W3C standard, yes, that would be the day.</FONT><BR>
<FONT color=#99ccff></FONT> <BR>
Regards.<BR>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR> Troy III<BR> progressive art enterprise<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR><BR><BR>
<HR id=stopSpelling>
<BR>
> Sorry for not answering your question as stated, but I like the third option:<BR>> <BR>> var oDiv = document.getElementById("MyBlock");<BR>> oDiv.style.padding = ...<BR>> <BR>> Paul <BR>> <BR>> _______________________________________________<BR>> Javascript mailing list<BR>> Javascript@LaTech.edu<BR>> https://lists.LaTech.edu/mailman/listinfo/javascript<BR><BR><br /><hr />Be one of the first to try Windows Live Mail. <a href='http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d' target='_new'>Windows Live Mail.</a></body>
</html>