473,396 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

TreeMenu - Complex disappearing problem

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();
Jul 23 '05 #1
1 1876
R0bert Neville schrieb:
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.
| The Validator XML support has some limitations
| <http://openjade.sourceforge.net/doc/xml.htm>.

See <http://www.w3.org/TR/xhtml1/#C_13> for a start.
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.
Since you are sending XHTML as text/html when it should be
application/xhtml+xml --

<http://www.hixie.ch/advocacy/xhtml>

-- you force Gecko's parser to do error correction since
it uses the HTML parser instead of the XML parser then.

IE 6, OTOH, since there is no stylesheet linked and it does
not really know how to handle XHTML, displays the document
element tree.

I recommend to refrain from using XHTML where possible, i.e. where
additional features provided by XML applications compared to HTML 4.01
Strict are not required. Where not possible, serve it with the proper
MIME type instead of relying on error correction. Bear in mind that
the latter makes it incompatible with current IE browsers.
[...]
Here are my discoveries while debugging (using Venkman). The
elementHasClass() should match the "element.ClassName" with
"TreeMenu."
You mean `element.className'. ECMAScript implementations are
case-sensitive.
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.
I am not sure if this is of help regarding your current problem,
but there are more valid values for `display' than just `block'
and `none'. CSS implicates that e.g. `td' elements have
display:table-cell and `tr' elements have display:table-row
initially which is why Gecko implements them this way while IE
does not.
But I can not pinpoint where the code goes down the wrong path;
needless to say develop a solution.
[...]


You should have mentioned that the methods you are referring to
are defined in a script file where the respective `script' element
has been commented out (javascript/javascript.js).
PointedEars
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Larry Woods | last post by:
I have a site that works fine for days, then suddenly, I start getting ASP 0115 errors with an indication that session variables IN SEPARATE SESSIONS have disappeared! First, for background...
9
by: F. Da Costa | last post by:
Hi, Does anybody know why IE5+ does *not* honour array objects (like a table) across a session? Example: Frame A contains a var tableVar which is set via form Frame B (on init) using...
2
by: Rachel Suddeth | last post by:
Here is my scenario: I have a few custom controls that I set up on a form and tested setting properties and appearances. Then I added a couple references to the project which add classes I need to...
6
by: Winshent | last post by:
I have read many threads which indicate that this was a problem with version 2002. Why should i be suffering this? I am using VB.NET 2003 Standard Edition... is it still a problem with 2003? ...
15
by: Mark Rae | last post by:
Hi, I'm presently converting a v1.1 ASP.NET app to v2, and am encountering a strange problem. When running in Debug mode (i.e. hitting F5), all is well. However, when running without...
0
by: lex Luthor | last post by:
hi i would like to integrate treemenu on quickform please help me..
0
by: moid | last post by:
Hi Sir I want treemenu to redirect the user to specific page mentioned in XML, right now its opening a new page Please help regards Moid Iqbal
0
by: gayathrirajamanickam | last post by:
hi what my problem is i need to increase the tree menu and that leaf also. for example if i select 3 tables means 3 menu wil be come in tree menu structure or 4 tables are select means 4 menu...
0
by: =?Utf-8?B?Q2hhcmxlcw==?= | last post by:
Like many people, I normally use Yahoo! Mail via the web and like to keep all my emails stored on the Yahoo! server. However sometimes I can’t get access to a PC/the web and I download my emails...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.