[Javascript] dynamically hide an element

Paul Novitski paul at juniperwebcraft.com
Tue Nov 28 18:55:43 CST 2006


At 11/28/2006 04:37 PM, Stephan Wehner wrote:
>Use
>
>  document.getElementById("ed1").style.visibility="none";
>
>instead of
>
>  document.getElementById("ed1").style.visibility="hidden";


No, "hidden" is correct for visibility.  Perhaps you're thinking of 
display: none.
___________________________

CSS 2.1 Specification
11.2 Visibility: the 'visibility' property
http://www.w3.org/TR/CSS21/visufx.html#visibility

'visibility'
     Value:      visible | hidden | collapse | inherit
___________________________

MSDN DHTML Reference
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/visibility.asp
visibility Attribute | visibility Property

Possible Values

     sVisibility String that specifies or receives one of the following values.
     inherit     Default. Object inherits the visibility of the next 
parent object.
     visible     Object is visible.
     hidden      Object is hidden.
___________________________

Regards,
Paul 




More information about the Javascript mailing list