tags:

views:

107

answers:

0

Hi guys,

I have a htmlDivElement (with no id) - and I'm trying to access and change the style of it..

Problem is everything I try returns 'Undefined' when i try to alert it

Eg:

alert (htmldivelementobject.className)

I've also tried getAttribute but it returns the same thing... Where am I going wrong?

F

full code below

var i=0;

for (i=0;i<=100;i++)
{
    if (document.getElementById("inst"+i))
    {
        //document.getElementById("inst"+i).style.display = "none";
        var content = getElementsByClassName(document.getElementById("inst"+i),"div","content");
        alert (content)

    }
}