Hi Steve,
What about document.getElementById('something').style.display
when there is an element with an id.
In your example you would have to use
document.getElements.ByTagName("li")[2].style.display
(presuming you knew which list item you were targetting)
Also, the display property may not yet be set. Try checking:
var state = (document.getElementById(id).style.display=="" ||
document.getElementById(id).style.display=="none")?"none":"block";
Grant
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, 22 June 2005 3:17 PM
To: [email protected]
Subject: [WSG] detecting css display properties
I have been trying to detect ,using javascript , the css display
property
(set via an external @import style sheet) of an element
Example
page: http://www.jimthatcher.com/site_resources.htm has a LI
(class="skip"
with CSS display:none.
but when i try to find this via the (IE DOM) i cannot locate it.
any ideas?
with regards
Steven Faulkner
Web Accessibility Consultant
National Information & Library Service (NILS)
454 Glenferrie Road
Kooyong Victoria 3144
Phone: (613) 9864 9281
Fax: (613) 9864 9210
Email: [EMAIL PROTECTED]
National Information Library Service
A subsidiary of RBS.RVIB.VAF Ltd.
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************
**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************