ianpri
February 20th, 2001, 07:54
Can someone help me answer how to reference the layers object in a collection.
I need to be able to iterate through a collection of <DIV> tags, but can't find the syntax (if any) of refrencing all the tags. You can use document.forms for forms or document.links for links, but i don't know what it is for layers!
Any help or a point in the right direction would be much appreciated!
Cheers
Ian
P.S
heres the code i'm using, which at the moment is iterating through the names of links and printing them out:
function printLinks() {
linkEnum = new Enumerator(document.all.links);
for (linkEnum.moveFirst(); !linkEnum.atEnd(); linkEnum.moveNext()) {
alert(linkEnum.item());
}
}
I need to be able to iterate through a collection of <DIV> tags, but can't find the syntax (if any) of refrencing all the tags. You can use document.forms for forms or document.links for links, but i don't know what it is for layers!
Any help or a point in the right direction would be much appreciated!
Cheers
Ian
P.S
heres the code i'm using, which at the moment is iterating through the names of links and printing them out:
function printLinks() {
linkEnum = new Enumerator(document.all.links);
for (linkEnum.moveFirst(); !linkEnum.atEnd(); linkEnum.moveNext()) {
alert(linkEnum.item());
}
}