473,371 Members | 1,442 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,371 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 1873
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.