[Javascript] js and css display: none

Paul Novitski paul at dandemutande.org
Mon Mar 29 20:01:50 CST 2004


At 03:21 PM 3/29/2004, BEKIM BACAJ wrote:
>No. display property removes the block completely making space for other 
>cascading elements to take its place.

Bekim,

I think your statement is incorrect.  If setting display to "none" removed 
an item from the document tree, it would be impossible to refer to it or to 
reset its display back to any other value.

However, this sequence works fine:

         oThingie.style.display = "none";
         alert(oThingie.style.display);
         oThingie.style.display = "block";

Paul


At 03:21 PM 3/29/2004, BEKIM BACAJ wrote:
>No. display property removes the block completely making space for other 
>cascading elements to take its place.
>Try using visibility property if you like it to become available in link 
>collection of the document so you will be able to put it in an array with 
>your script.
>
>
>>From: "Ira S. Mark" <ismark at ismdesigns.com>
>>Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
>>To: js list post <javascript at LaTech.edu>
>>Subject: [Javascript] js and css display: none
>>Date: Sun, 28 Mar 2004 20:50:49 -0500
>>
>>List: I am having trouble with an onload script. (And what else is new?) 
>>Have a question which I assume is "yes." but want to be sure: if a link 
>>is in a block of code that is display: none, it still part of the 
>>document.links array, no? Display removes code from presentation, but not 
>>from the document tree(?). Thanks, Ira
>>_______________________________________________
>>Javascript mailing list
>>Javascript at LaTech.edu
>>https://lists.LaTech.edu/mailman/listinfo/javascript
>
>_________________________________________________________________
>STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
>http://join.msn.com/?page=features/junkmail
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript





More information about the Javascript mailing list