[Javascript] Named Layers in IE

Jay Lepore admin at myinternethandyman.com
Mon Aug 27 04:32:05 CDT 2001


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?




More information about the Javascript mailing list