-
bug in smart folding menu script
hello, I wanted to implement the following script:
http://www.dynamicdrive.com/dynamicindex1/navigate1.htm however, it seems that it does not work if the list is less than 2, i tried with the given example by simply removing 1 branch of ul and it failed.. if there are 3 or more it works.
this behavior occurs if you want to preserve the state using cookies.
Last edited by henok; 10-18-2004 at 07:52 PM.
-
-
Script: Smart Folding Menu Tree
http://www.dynamicdrive.com/dynamicindex1/navigate1.htm
I am having the same problem. I get an error saying that the array must be a positive integer. In the cookie saving code, the error is in the following loop
if (ns6||ie4){
var nodelength=ns6? c-1 : foldinglist.length-1
var nodes=new Array(nodelength)
var openones=''
}
To fix it, I changed it as follows.
if (!(c==0)||foldinglist.length==0){
if (ns6||ie4){
var nodelength=ns6? c-1 : foldinglist.length-1
var nodes=new Array(nodelength)
var openones=''
}
}
Well, the error goes away, but it doesn't save the state anymore. When I navigate away from the page and come back, the menu is folded back up again. I'm going to keep working on it, but if anyone has a quick answer I'd appreciate it.
I am a total, total newbie and know nothing of script language. I do know fortran from years ago. Is the syntax and function correct? (methinks perhaps I need only check c)
http://www.flyingscool.com
Last edited by Wildfire563; 04-09-2006 at 11:55 AM.
-
-
Well, rather than fix the problem, I went back to having two folding menus in my page for now. I'll take time to fix it later but have it working now.
I would like to know how to fix it for the future, though.
Thanks,
Thomas
http://www.flyingscool.com
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks