Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: SV: Trouble with Netscape 4.X nested layers


Message #1 by "Robert Nyman" <robert.nyman@c...> on Fri, 25 Oct 2002 16:03:18 +0200
See reply posted in beginning_javascript.

Please avoid multiposting, if you have a general problem I'd recommend
that you post it to javascript@p...


/Robert


-----Ursprungligt meddelande-----
Fr=E5n: chrscote@9... [mailto:chrscote@9...]
Skickat: den 25 oktober 2002 15:06
Till: JavaScript HowTo
=C4mne: [javascript_howto] Trouble with Netscape 4.X nested layers


I need some serious help with getting properties of a nested layer in
Netscape 4.X.  The problem I'm having is that the outer layer contains a

table in which I have id in the <td>s.  I have tried displaying the
objects I get back from my calls and I keep getting "undefined".  Here
is
the main part of the body that I am having problems with:

<div id=3D"MainMenu">
   <table border=3D"0">
      <tr>
         <td id=3D"Menu1" onmouseover=3D"ShowLayer(1);">MainMenu 1</td>
         <td id=3D"Menu2">MainMenu 2</td>
         <td id=3D"Menu3">MainMenu 3</td>
      </tr>
   </table>
</div>

Within ShowLayer(n), I have an if clause to check for Netscape 4.X.
Then,
within the if, I have a line that reads:
          MenuShow =3D "Menu" + n;
          alert(document.layers['MainMenu'].layers[MenuShow]);
However, when the alert pops up, all I get is "undefined".  If however,
I
change the alert to display document.layer['MainMenu'], I get "[object
Layer]" for a value.

I would appreciate any and all help I can get.

Thank you,
Chris Cote

---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20


  Return to Index