| | Discussion and Rate this Resource Overall Rating: 4.2 | Rpierce on Sep 15, 2000 at 10:26:10 PM | No Rating | Ok, I found a solution. This works in IE4, IE5 and IE5.5:
<IMG SRC="images/folder.gif" ID="stuff" CLASS="parent" STYLE="cursor: hand" WIDTH="16" HEIGHT="16"> Item 1<BR> <DIV ID="stuffd" CLASS="child" STYLE="display:None"> <table> <tr> <td>content here baby!<BR></td> </tr> </table> </DIV> <IMG SRC="images/folder.gif" ID="stuff1" CLASS="parent" STYLE="cursor: hand" WIDTH="16" HEIGHT="16"> Item 1<BR> <DIV ID="stuff1d" CLASS="child" STYLE="display:None"> <table> <tr> <td>content here baby!<BR></td> </tr> </table> </DIV>
<SCRIPT LANGUAGE="JavaScript"> function clickHandler() { var targetId, srcElement, targetElement; srcElement = window.event.srcElement; if (srcElement.className == "parent") { targetId = srcElement.id + "d"; targetElement = document.all(targetId); if (targetElement.style.display == "none") { targetElement.style.display = ""; srcElement.src = "images/ofolder.gif"; } else { targetElement.style.display = "none"; srcElement.src = "images/folder.gif"; } } }
document.onclick = clickHandler;
</SCRIPT><STYLE TYPE="text/javascript"> <!-- classes.child.ALL.display = "block" // --> </STYLE> | | Rpierce on Sep 13, 2000 at 8:40:23 PM | No Rating | This works great in IE4, and IE5, but not in IE5.5
Does anyone know why? - I've been wading through my MSDN resources and can't find anything to speak to it.
I hate it when the break stuff for us....
:) | | fchau on Sep 28, 1999 at 8:54:52 AM | Rating: 4 | |
I'm surprised no one has commented that the first line:
<H2 CLASS="parent" CHILD="how">How is this done?</H3>
should have </H2> vs. </H3>
it's minor, but it should be updated.
too bad NS doesn't support reflow... | | Scott Isaacs on Jul 27, 1999 at 3:41:29 PM | No Rating | | Correct - the purpose of the JASS script is merely to avoid losing information in Netscape. Netscape does not support reflow so there is no way to easily do expanding/ collapsing outlines (the hard way is to absolutely position everything and script your entire layout) | | CyBerlin on Jul 27, 1999 at 12:32:10 PM | No Rating | OK, I get it. The workaround only lets the pages load in Netscape as visible display blocks. Using "display:none" really is an IE only solution.
There is no way to use this CSS syntax to create a cross-browser solution. |
More Ratings/ Comments
To rate and comment on a resource, you must first logon.
If you are not registered, please register yourself to become a member of the SiteExperts.community.
|