Christian Mattar wrote: > Hi! > > Yatsu wrote: >> >> > >> > so.. >> > >> > if(document.getElementByID("foldheader")) >> >> I'm afraid the javascript console complains at this line. >> "document.getElementByID is not a function." > > It's 'getElementById', not 'getElementByID'. > > Christian
ah, cheers :) Hum, still didn't work though. Having spend a little more time looking into the script i've (finally) come to the understanding that all it does is - check is the calling object has a certain ID - store a reference to the next object - change the css attribute "display" to either "none" or " ". doing so shows or hides the items nested in the object. the only thing faulty about this is that it uses the ID property (or is it attribute? :) which is meant to be unique. Is it possible to identify objects by class? so.. if(<getElementByClass?> == "folder") { if(<object.style.display> == "none") { <object.style.display> == " "; } else { <object.style.display> == "none"; } return } hey, atleast i'm trying ;)