...

View Full Version : Menu Hidden?



hheyh222
11-04-2010, 11:30 PM
I've tested this in firefox, IE and chrome and it works on some computers but not others.

http://****************/michigan/traversecity.html

The menu is hidden, and it's not because of the image.

Here is the code for a portion of the menu




<div id="contentWrapper">

<div id="leftColumn1"><!-- TemplateBeginEditable name="leftsidebar" -->

<div id="leftColumnContent">

<ul class="treemenu">

<li class="treenode">

<a href="">Accounting</a>

<ul>

<li><a href="http://****************/content/TraverseCity/1.html">Accountants</a></li>

<li><a href="http://****************/content/TraverseCity/2.html">Bookkeeping</a></li>

<li><a href="http://****************/content/TraverseCity/3.html">Certified Public</a></li>

<li><a href="http://****************/content/TraverseCity/4.html">General Services</a></li>

</ul>

</li>

<ul class="treemenu">

<li class="treenode"><a href="" >Animals</a>

<ul>

<li><a href="http://****************/content/TraverseCity/5.html">Food &amp; Supplies</a></li>

<li><a href="http://****************/content/TraverseCity/6.html">Grooming</a></li>

<li><a href="http://****************/content/TraverseCity/7.html">Hospitals</a></li>

<li><a href="http://****************/content/TraverseCity/8.html">Kennel</a></li>

<li><a href="http://****************/content/TraverseCity/9.html">Removal</a></li>

<li><a href="http://****************/content/TraverseCity/10.html">Rescue</a></li>

<li><a href="http://****************/content/TraverseCity/11.html">Veterinarian</a></li>

</ul>

</li>

<ul class="treemenu">

<li class="treenode"><a href="">Antiques</a>

<ul>

<li><a href="http://****************/content/TraverseCity/12.html">Dealers</a> </li>

<li><a href="http://****************/content/TraverseCity/13.html">Repair</a></li>

</ul>

</li>
</ul>


</div>

</div>

DrDOS
11-04-2010, 11:57 PM
I think the problem may be the fact that in some browsers getElementById is case sensitive, and some not. You might want to change the getElementById entries in the menu.js to lower case, which is the actual case used in the HTML.

hheyh222
11-05-2010, 12:24 AM
I just tried it, and it made the menu opened rather than being closed until clicked, so basically disabled the javascript.
thanks for trying though

DrDOS
11-05-2010, 12:47 AM
OK, now I see you have more than one menu.js, the one that needs to have the case changed is the listmenu.js, that's the one I was looking at.

hheyh222
11-05-2010, 12:52 AM
yes, thats the one that i changed

teedoff
11-05-2010, 12:56 AM
Just out of curiousity, have the pcs that cant see the menu had javascript disabled? I've loaded your page several times and the menu appears fine.

DrDOS
11-05-2010, 12:59 AM
OK, I see what you did.

You changed to this.
var aMenus = document.getelementsbytagname("LI");
but I meant the entries, which is this
var aMenus = document.getElementsByTagName("li");
the entries being the enclosed tag names.

hheyh222
11-05-2010, 01:12 AM
Oh sorry, Im new with javascript. I changed it back and then changed the li and ul entires to lowercase, but the menu is still wide open.
The browser ive been checking it on does have javascript enabled.

teedoff
11-05-2010, 01:22 AM
Ok then...you have quite a few coding validation errors, 133 to be exact. Some of which I noticed were <li> items that are not nested with an ordered or unordered list. You should try to fix these errors as a next step...well I like to think code validation is a first step in debugging rendering issues. At any rate, validate your code here (http://validator.w3.org).

hheyh222
11-05-2010, 01:39 AM
thanks very much! ive found the mistake.

DrDOS
11-05-2010, 01:40 AM
Edited: No I still see uppercase LI, UL and A tags in that listmenu javascript.

var aMenus = document.getElementsByTagName("LI");
should be
var aMenus = document.getElementsByTagName("li");

if (submenu[j].tagName == "A") should be

if (submenu[j].tagName == "a") and so on down the list. All of them.

teedoff
11-05-2010, 01:49 AM
thanks very much! ive found the mistake.

What was it?..dont just leave everyone hanging! lol

hheyh222
11-05-2010, 03:18 AM
I had an extra ul before each menu item.

But theres a new problem now.

The menu is working perfectly, but the content section got moved below the menu, so the page has to be scrolled way down to see the content.

Any ideas?

hheyh222
11-05-2010, 03:20 AM
actually, never mind lol.
I fixed that by adding another </div> after the menu.

Im all good now, thanks for the help



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum