Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Named Layers in IE


  • From: javascript@xxxxxxxxxx (Peter Brunone)
  • Subject: [Javascript] Named Layers in IE
  • Date: Mon, 27 Aug 2001 10:39:17 -0500

    You mean by cycling through document.all?  Why don't you just check for
a value of .name, and if none exists, you disregard it?  Seems like the DOM
is being even more helpful than you need.

----- Original Message -----
From: "Jay Lepore" <admin@xxxxxxxxxxxxxxxxxxxxxx>
To: <javascript@xxxxxxxxxx>
Sent: Monday, August 27, 2001 4:32 AM
Subject: [Javascript] Named Layers in IE


| Hello,
|
| If I want to display a list of just the named layers in Netscape, I
| could use this code:
|
| var layersln;
| var layernm="";
| layerslen=window.document.layers.length;
| for(index=0;index<layerslen;index++) {
| var layernm=layernm+"layer "+index+" =
| "+window.document.layers[index].name+"\n";
| }
| alert(layernm);
|
| In IE however, I cannot figure out how to accomplish the same thing
| without getting ALL layers instead of just named layers.
|
| Any ideas?