<HTML>
<HEAD>
<TITLE>GetElementByElement?</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana">Hello All,<BR>
<BR>
I grabbed a bit of code from a dhtml kitchen tutorial. &nbsp;I am trying to modify it to fit my needs. &nbsp;Below is the original code <BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;function setStyle(obj,style,value){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getRef(obj).style[style]= value;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;function getRef(obj){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return (typeof obj == &quot;string&quot;) ?<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(obj) : obj;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<BR>
You can then use an onclick event to set a style by id, and it works beautifully. &nbsp;<BR>
<BR>
&lt;p class=&quot;link&quot; onclick=&quot;setStyle('fixed','visibility','hidden')&quot;&gt;Close The Ad&lt;/p&gt;<BR>
<BR>
What I need to do is change and element property along with an id property. &nbsp;In other words, set &nbsp;a div to display:none; and change the an element like body: padding-bottom: 0; &nbsp;<BR>
I don&#8217;t know if a function exists like getElement? &nbsp;Maybe than I could write a function to recognize the body element css properties in order to switch the properties? &nbsp;Has anyone tired to do this before? &nbsp;Any help would be appreciated.<BR>
<BR>
Thanks,<BR>
Simeon </FONT>
</BODY>
</HTML>