[Javascript] FW: Menu not remembering where you are
Russ Peters
rpeters at WECU.org
Thu Dec 7 14:40:05 CST 2006
>
> > I have a menu that uses some JavaScript to expand and collapse
> > dynamically. My problem is that it's not remembering which menu
item
> > was clicked and keeping the menu expanded on the next page. Can
> > someone
> > take a look and see where I'm going wrong?
> >
> > http://www.redcanoecu.com/loans.asp
>
> The initMenu function is what does this. It is operating on the #nav
> rather than on the #leftnav.
>
> Try changing
> var nav= document.getElementById('nav');
> to
> var nav= document.getElementById('leftnav');
>
> The way initMenu works is it checks the href on all the a elements
> inside nav and if it finds a match, sets the style so that element is
> visible.
>
> --
> Roger
Thought I'd just let everyone know that Roger helped me through this one
and this solution works perfectly.
Russ
More information about the Javascript
mailing list