[Javascript] See if item is hidden...

Chris T christ at saeweb.com
Tue Jun 22 13:45:19 CDT 2004


I think Walter is saying this style is still set to display, but it's parent
is set to none, is that right Walter? If so, I would have thought the
display property would also cascade dynamically (since that's what the C
stands for in CSS), but maybe that's not the case. I've personally never
tested to find out.

If it doesn't update the property when the main parent's display property
updates, perhaps it's best to store which one is it's "parent" (not a true
parent since it's several nodes up) and check it's display property.  Of
course you could walk up the tree until you hit what would be its parent.

Chris Tifer

----- Original Message ----- 
From: <shawn_milochik at godivachoc.com>
To: <javascript at LaTech.edu>
Sent: Tuesday, June 22, 2004 2:10 PM
Subject: Re: [Javascript] See if item is hidden...


>
>
>
>
> If by "turning off," you mean that the style was set to "display: none,"
> then I think that you should
> be able to read that property with Javascript.  (untested)
>
>
>
> Shawn
>
>
>
>
>
>              jsWalter at torres.w
>              s
>              Sent by:                                                   To
>              javascript-bounce         javascript at LaTech.edu
>              s at LaTech.edu                                               cc
>
>                                                                    Subject
>              06/22/2004 01:50          [Javascript] See if item is
>              PM                        hidden...
>
>
>              Please respond to
>              javascript at LaTech
>                    .edu
>
>
>
>
>
>
> Anyone have any idea how I can discover if a page item is hidden if it
> is a child of some other element?
>
> Example: I have 2 DIV, each DIV has 2 SPANs, each SPAN has 2 Ps,
>
>       DIV a
>         SPAN a1
>            P  a11
>            P  a12
>         SPAN a2
>            P  a21
>            P  a22
>
>       DIV b
>         SPAN b1
>            P  b11
>            P  b12
>         SPAN b2
>            P  b21
>            P  b22
>
> Now, the user turns "off" DIV 'a' and everything it has disappears.
>
> Say I want to insert some text in 'Pa21', but I need to know if it is
> showing or not.
>
> How can I know if 'Pa21' is "showing"?
>
> Thanks
>
> Walter
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
>
>
> **********************************************************************
> This e-mail and any files transmitted with it may contain
> confidential information and is intended solely for use by
> the individual to whom it is addressed.  If you received
> this e-mail in error, please notify the sender, do not
> disclose its contents to others and delete it from your
> system.
>
> **********************************************************************
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list