Click to See Complete Forum and Search --> : DIVs' name property in Netscape


dopoto
08-22-2004, 04:25 AM
Hello,
I use the following code, that works fine in IE, to locate a DIV based on its name and change its properties:

var divcol = document.getElementsByTagName("DIV");
for (var i=0;i<divcol.length;i++)
{
if (divcol[i].name.indexOf("_title")>-1)
{
// DO SOMETHING HERE
}
}

But it seems that Netscape can't handle the .name property. Do you have any suggestions?
Greetings , Doru

Fang
08-22-2004, 05:11 AM
divcol[i].getAttribute (http://www.mozilla.org/docs/dom/domref/dom_el_ref38.html)("name").indexOf("_title")