Yatsu wrote:

> DeMoN LaG wrote:
> 
>> William Leese <[EMAIL PROTECTED]> wrote in
>> 9qt5sp$2fuo$[EMAIL PROTECTED]">news:9qt5sp$2fuo$[EMAIL PROTECTED], on 20 Oct 2001:
>> 
>>> Hello,
>>> 
>>> A while ago i was looking for a simple, fast collapsible and
>>> expandable tree menu for quick navigation. Having looked at a large
>>> amount of scripts to do this my decision fell on the one below.
>>> 
>>> But, it turned out that it was IE only.... (and uses the same ID
>>> for multiple objects).
>>> 
>>> Is there anyway of adapting the script to work with Mozilla and IE?
>>> ----
>>> var head="display:''"
>>> img1 = new Image()
>>> img1.src = "fold.gif"
>>> img2 = new Image()
>>> img2.src = "open.gif"
>>> 
>>> function change()
>>> { 
>>>     if(!document.all)
>> 
>> document.all is IE only
> 
> I don't quite understand this condition. if all page elements there are no
> page elements? is there a mozilla equivalent?
> 
> and no, i'm obviously not a webdeveloper :)
> 
>>>     return
>>> 
>>>     if (event.srcElement.id=="foldheader")
>>>     {
>>>         var srcIndex = event.srcElement.sourceIndex
>>>         var nested = document.all[srcIndex + 1]
>> 
>> You want document.getElementByID("foo") here, (foo obviously being the
>> element's ID)
> 
> so..
> 
> if(document.getElementByID("foldheader"))

I'm afraid the javascript console complains at this line. 
"document.getElementByID is not a function."

> {
>     var srcIndex = event.srcElement.sourceIndex;
>     var nested = getElementByID[srcIndex + 1];
> }
>
> is event.srcElement supported by Moz?


Reply via email to