<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>GetElementByElement?</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>If I get you right, you should just need to give 
this DIV an ID and call something like:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>setStyle("IDName", "display", "none")</FONT></DIV>
<DIV><FONT face=Arial size=2>// Where IDName is the ID of your DIV</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Now if you want to use this method to apply 
multiple styles to a single element, it looks like you'll just need to make 
multiple calls.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Chris Tifer</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=simeon@simeons.net href="mailto:simeon@simeons.net">Simeon 
  Willbanks</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=javascript@latech.edu 
  href="mailto:javascript@latech.edu">javascript@latech.edu</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, March 03, 2004 1:58 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [Javascript] 
  GetElementByElement?</DIV>
  <DIV><BR></DIV><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 == "string") 
  ?<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="link" onclick="setStyle('fixed','visibility','hidden')"&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’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>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Javascript mailing 
  list<BR>Javascript@LaTech.edu<BR>https://lists.LaTech.edu/mailman/listinfo/javascript<BR></BLOCKQUOTE></BODY></HTML>