Newsgroup: it.comp.lang.javascript
Titolo: Menu collassabili (stile directory)

prendendo spunto qua e la ho realizzato in menu stile directory di windows.
Purtroppo con NS4 non funziona, c'č qualcuno in grado di spiegarmi il
perchč?
<HTML>
<HEAD>
<TITLE>Internet Explorer Site Map</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<STYLE><!--
.btop {text-decoration:none; color:black;}
.btop:hover {text-decoration:underline;}
--></STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#000066" VLINK="#666666"
TOPMARGIN=0 LEFTMARGIN=0 >
<FONT FACE="verdana,arial,helvetica" SIZE=2><BR>
<FONT SIZE=3><B>Prova menu collapsible</B></font>
<P>
<!--============== menu 1
======================================================================-->
<IMG SRC="folder.gif" ID=Out1 STYLE="cursor:hand;" CLASS=Outline>&nbsp;Menu
1<BR>
<DIV ID=Out1d STYLE="display:none;">
&nbsp;&nbsp;<A HREF="/??????" TARGET="_top">News</A><BR>
 &nbsp;&nbsp;&nbsp;<IMG SRC="folder.gif" ID=Out3 STYLE="cursor:hand;"
CLASS=Outline>&nbsp;&nbsp;Uno<BR>
 <DIV ID=Out3d STYLE="display:none;">
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/??????"
TARGET="_top">uno</A><BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/??????"
TARGET="_top">due</A><BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/??????"
TARGET="_top">tre</A><BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/??????"
TARGET="_top">quattro</A><BR>
 </DIV>
 &nbsp;&nbsp;&nbsp;<IMG SRC="folder.gif" ID=Out4 STYLE="cursor:hand;"
CLASS=Outline>&nbsp;&nbsp;Due<BR>
 <DIV ID=Out4d STYLE="display:none;">
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/??????"
TARGET="_top">uno</A><BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/??????"
TARGET="_top">due</A><BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/??????"
TARGET="_top">tre</A><BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/??????"
TARGET="_top">quattro</A><BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/??????"
TARGET="_top">cinque</A><BR>
 </DIV>
</DIV>
<!--============== menu 2
======================================================================-->
<IMG SRC="folder.gif" ID=Out8 STYLE="cursor:hand;" CLASS=Outline>&nbsp;Menu
2<BR>
<DIV ID=Out8d STYLE="display:none;">
 &nbsp;&nbsp;&nbsp;<IMG SRC="folder.gif" ID=Out9 STYLE="cursor:hand;"
CLASS=Outline>&nbsp;&nbsp;UNO<BR>
 <DIV ID=Out9d STYLE="display:none;">
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="/??????"
TARGET="_top">documento</A><BR>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<IMG SRC="folder.gif" ID=Out10
STYLE="cursor:hand;" CLASS=Outline>&nbsp;&nbsp;uno<BR>
  <DIV ID=Out10d STYLE="display:none;">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<IMG
SRC="60-60-60.gif">&nbsp;&nbsp;<A HREF="/??????"
TARGET="_top">documento</A><BR>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<IMG
SRC="folder.gif" ID=Out10a STYLE="cursor:hand;"
CLASS=Outline>&nbsp;&nbsp;uno<BR>
   <DIV ID=Out10ad STYLE="display:none;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
HREF="/??????" TARGET="_top">uno</A><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
HREF="/??????" TARGET="_top">due</A><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
HREF="/??????" TARGET="_top">tre</A><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
HREF="/??????" TARGET="_top">quattro</A><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
HREF="/??????" TARGET="_top">cinque</A><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
HREF="/??????" TARGET="_top">sei</A><BR>
   </DIV>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<IMG
SRC="folder.gif" ID=Out10b STYLE="cursor:hand;"
CLASS=Outline>&nbsp;&nbsp;due<BR>
   <DIV ID=Out10bd STYLE="display:none;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
HREF="/??????" TARGET="_top">uno</A><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
HREF="/??????" TARGET="_top">due</A><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
HREF="/??????" TARGET="_top">tre</A><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
HREF="/??????" TARGET="_top">quattro</A><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
HREF="/??????" TARGET="_top">cinque</A><BR>
   </DIV>
                </DIV>
        </DIV>
</DIV>
<!--============== menu 3
======================================================================-->
<IMG SRC=" folder.gif" ID=Out38 STYLE="cursor:hand;"
CLASS=Outline>&nbsp;Menu 3<BR>
<DIV ID=Out38d STYLE="display:none;">
&nbsp;&nbsp;<A HREF="/??????" TARGET="_top">uno</A><BR>
</DIV>
</FONT>
<SCRIPT LANGUAGE="JavaScript"><!--
if (document.image){
 var img1, img2;
 img1 = new Image();
 img1.src = "folder.gif";
 img2 = new Image();
 img2.src = "ofolder.gif";
}
function doOutline() {
  var targetId, srcElement, targetElement;
  srcElement = window.event.srcElement;
  if (srcElement.className == "Outline") {
     targetId = srcElement.id + "d";
     targetElement = document.all(targetId);
     if (targetElement.style.display == "none") {
        targetElement.style.display = "";
        if (srcElement.tagName == "IMG") {
           srcElement.src = "ofolder.gif";
        }
     } else {
        targetElement.style.display = "none";
        if (srcElement.tagName == "IMG") {
            srcElement.src = "folder.gif";
        }
     }
  }
}
document.onclick = doOutline;
//--></SCRIPT>
<BR><BR>
</BODY>
</HTML>

 ha scritto nel messaggio
news:8u9f5s$7tu$1...@fe2.cs.interbusiness.it...

[]

 non usa l'attributo *srcElement* per gli eventi
Ce l'ha, ce l'ha.. A modo suo, ma ce l'ha. ^_-

 Ce l'ha, ce l'ha.. A modo suo, ma ce l'ha. ^_-
[]
E' quello che ho detto :
"tutti questi attributi sono estensioni/modifiche di IE che, in parte,
hanno un corrispondente attributo in NS; "
forse mi sono espresso male, ma intendevo che NS non usa le
denominazioni elencate.
Saluti, Paolo

 hanno un corrispondente attributo in NS; "
Non specificando la "parte", ed avendo letto "non usa l'attributo
srcElement" ho pensato che tu intendessi che non ce l'avesse. Mal
interpretazione da parte mia, scusa. ^__-

 un po' di piu' le maniche...
[]
Sfortunatamente con molti limiti, vedi il bgColor sulla cella, che come
dici richiedono un mare di lavoro.
Saluti, Paolo

 dici richiedono un mare di lavoro.
Beh, si, cmq io mi riferivo ai layers in generale. Il problema di fondo e'
che NS non gestisce ottimamente i CSS.