R
R0bert Neville
My web page has one unordered list that disappears in Firefox. The
unordered list in question has the class="dir". I double-checked the
source code and verified the markup's semantics. Everything looked
fine. So I placed the code in the W3C validator and it passed with no
errors. Then I placed a regular unordered list with no class before
the previous unordered list. Upon a reload, the new unordered list did
not render, yet the unordered list with the "dir" class appeared. The
whole situation was strange.
After reviewing web page with the DOM inspector, the disappearing list
had been assigned {display: none}. Apparently, my JavaScript for
TreeMenu functionality was the culprit. I attempted to debug the
JavaScript. Sadly, my JavaScript knowledge is elementary even though I
successfully implemented the approach from
http://www.bakketun.net/listmenu/. When my web page became more
convoluted, the JavaScript began faltering along its seams.
Here are my discoveries while debugging (using Venkman). The
elementHasClass() should match the "element.ClassName" with
"TreeMenu." If not, the function return false. Unfortunately, another
function passes the div element to the setMenu(); then the said
function assign the display attribute; block or none.
But I can not pinpoint where the code goes down the wrong path;
needless to say develop a solution.
Please review the site below and let me know if you have suggestions.
View source and search for class="dir"; the disappearing list has the
text "test." Problematic code JavaScript area may include the line
listed below. This posting was intended as a short description.
Further clarification will be gladly provided if someone shows
interest in a particular aspect. I have pages of notes on the
debugging process.
http://neville.f2o.org/Template_Sample.html
Line 93
function setMenu(menu, open)
Line 75
setMenu(menu.parentNode, open);
Line 26
elementHasClass( menus[ i ], "keepopen" )
Line 106 is the following:
initMenus();
unordered list in question has the class="dir". I double-checked the
source code and verified the markup's semantics. Everything looked
fine. So I placed the code in the W3C validator and it passed with no
errors. Then I placed a regular unordered list with no class before
the previous unordered list. Upon a reload, the new unordered list did
not render, yet the unordered list with the "dir" class appeared. The
whole situation was strange.
After reviewing web page with the DOM inspector, the disappearing list
had been assigned {display: none}. Apparently, my JavaScript for
TreeMenu functionality was the culprit. I attempted to debug the
JavaScript. Sadly, my JavaScript knowledge is elementary even though I
successfully implemented the approach from
http://www.bakketun.net/listmenu/. When my web page became more
convoluted, the JavaScript began faltering along its seams.
Here are my discoveries while debugging (using Venkman). The
elementHasClass() should match the "element.ClassName" with
"TreeMenu." If not, the function return false. Unfortunately, another
function passes the div element to the setMenu(); then the said
function assign the display attribute; block or none.
But I can not pinpoint where the code goes down the wrong path;
needless to say develop a solution.
Please review the site below and let me know if you have suggestions.
View source and search for class="dir"; the disappearing list has the
text "test." Problematic code JavaScript area may include the line
listed below. This posting was intended as a short description.
Further clarification will be gladly provided if someone shows
interest in a particular aspect. I have pages of notes on the
debugging process.
http://neville.f2o.org/Template_Sample.html
Line 93
function setMenu(menu, open)
Line 75
setMenu(menu.parentNode, open);
Line 26
elementHasClass( menus[ i ], "keepopen" )
Line 106 is the following:
initMenus();