bajanpoet
12-21-2006, 01:52 PM
1) Script Title:
Simple Tree Menu
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/navigate1.htm
3) Describe problem:
I set up the Simple Tree Menu on my website using Frontpage. When I test it, the menu comes up as a simple unordered list (no icons) and when I Expand and Contract the menus, The open and close icons respectively suddenly show up behind the list item that's being expanded or contracted as a tiled background.
When I checked the simpletree.js file I found this code
ddtreemenu.buildSubTree=function(treeid, ulelement, index){
ulelement.parentNode.className="submenu"
if (typeof persisteduls[treeid]=="object"){ //if cookie exists (persisteduls[treeid] is an array versus "" string)
if (ddtreemenu.searcharray(persisteduls[treeid], index)){
ulelement.setAttribute("rel", "open")
ulelement.style.display="block"
ulelement.parentNode.style.backgroundImage="url("+ddtreemenu.openfolder+")"
The code that concerns me is in bold. This is the snippet that deals with expanded lists - there's similar code for contracted lists. The parent node's icon is a background image. Is that supposed to be like that? How do I get it to work like in the demo on the homepage?:confused:
Simple Tree Menu
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/navigate1.htm
3) Describe problem:
I set up the Simple Tree Menu on my website using Frontpage. When I test it, the menu comes up as a simple unordered list (no icons) and when I Expand and Contract the menus, The open and close icons respectively suddenly show up behind the list item that's being expanded or contracted as a tiled background.
When I checked the simpletree.js file I found this code
ddtreemenu.buildSubTree=function(treeid, ulelement, index){
ulelement.parentNode.className="submenu"
if (typeof persisteduls[treeid]=="object"){ //if cookie exists (persisteduls[treeid] is an array versus "" string)
if (ddtreemenu.searcharray(persisteduls[treeid], index)){
ulelement.setAttribute("rel", "open")
ulelement.style.display="block"
ulelement.parentNode.style.backgroundImage="url("+ddtreemenu.openfolder+")"
The code that concerns me is in bold. This is the snippet that deals with expanded lists - there's similar code for contracted lists. The parent node's icon is a background image. Is that supposed to be like that? How do I get it to work like in the demo on the homepage?:confused: