marcan
03-14-2005, 10:44 PM
Hi ! First, congratulations for these great scripts ! It is really usefull !
I have a problem with Smart Folding Menu tree. Everything works fine in IE but with FireFox, most of the time, the nodes are frozen, they do not open... It does not happen all the time.... Here is an example site :
http://demo.smartfactory.ca/modules/smartfaq/
If it works for you, try navigate on the site a bit an then come back to the SmartFAQ. It will do it at some point.
When the node freezes, if I enabled the Javascript Console, I get one of these errors :
error : foldercontent has no propertiers
foldercontentarray[openresults[i]].previousSibling.previousSibling.style has no properties
I can reproduce this on the very example at Dynamicdrive so the problem is not vert likely to come from my implementation of it.
Here is a discussion I had with a friend, maybe it could help some of you guys :
Brian: here's the thing, the error occurs on this line:
var foldercontent=ns6? cur.nextSibling.nextSibling : cur.all.tags("UL")[0]
Brian: which says, take the current element (cur)
Brian: look the next element on the same level as the current element, then look at the next element after that (so 2 elements away from the current one)
Brian: but if you look at the html
Brian: 2 elements away is the next li tag, not the UL tag
marcan [SmartFactory.ca]: ahhh !
marcan [SmartFactory.ca]: how can I fix that ?
[...]
Brian: ok the more I look at the code, the more I think it to be a browser bug. On one load cur.nextSibling.nextSibling returns null, on the next it returns the UL element (as it should)
[...]
Brian: the code should work fine in FF and IE as written. I figured out that Gecko browsers put a TEXT element in-between the LI and the UL, which is why we move two down, instead of just one
Any help would be greatly appreciated :-)
Thanks !
I have a problem with Smart Folding Menu tree. Everything works fine in IE but with FireFox, most of the time, the nodes are frozen, they do not open... It does not happen all the time.... Here is an example site :
http://demo.smartfactory.ca/modules/smartfaq/
If it works for you, try navigate on the site a bit an then come back to the SmartFAQ. It will do it at some point.
When the node freezes, if I enabled the Javascript Console, I get one of these errors :
error : foldercontent has no propertiers
foldercontentarray[openresults[i]].previousSibling.previousSibling.style has no properties
I can reproduce this on the very example at Dynamicdrive so the problem is not vert likely to come from my implementation of it.
Here is a discussion I had with a friend, maybe it could help some of you guys :
Brian: here's the thing, the error occurs on this line:
var foldercontent=ns6? cur.nextSibling.nextSibling : cur.all.tags("UL")[0]
Brian: which says, take the current element (cur)
Brian: look the next element on the same level as the current element, then look at the next element after that (so 2 elements away from the current one)
Brian: but if you look at the html
Brian: 2 elements away is the next li tag, not the UL tag
marcan [SmartFactory.ca]: ahhh !
marcan [SmartFactory.ca]: how can I fix that ?
[...]
Brian: ok the more I look at the code, the more I think it to be a browser bug. On one load cur.nextSibling.nextSibling returns null, on the next it returns the UL element (as it should)
[...]
Brian: the code should work fine in FF and IE as written. I figured out that Gecko browsers put a TEXT element in-between the LI and the UL, which is why we move two down, instead of just one
Any help would be greatly appreciated :-)
Thanks !