Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14

Thread: Menu Hidden?

  1. #1
    New Coder
    Join Date
    Sep 2010
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Angry Menu Hidden?

    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

    Code:
    <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>

  • #2
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,899
    Thanks
    15
    Thanked 226 Times in 226 Posts
    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.

  • #3
    New Coder
    Join Date
    Sep 2010
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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
    Last edited by hheyh222; 11-05-2010 at 12:30 AM.

  • #4
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,899
    Thanks
    15
    Thanked 226 Times in 226 Posts
    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.

  • #5
    New Coder
    Join Date
    Sep 2010
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    yes, thats the one that i changed

  • #6
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,332
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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.
    Last edited by teedoff; 11-05-2010 at 01:08 AM.

  • #7
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,899
    Thanks
    15
    Thanked 226 Times in 226 Posts
    OK, I see what you did.
    Code:
    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.

  • #8
    New Coder
    Join Date
    Sep 2010
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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.

  • #9
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,332
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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.

  • Users who have thanked teedoff for this post:

    hheyh222 (11-05-2010)

  • #10
    New Coder
    Join Date
    Sep 2010
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    thanks very much! ive found the mistake.

  • #11
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,899
    Thanks
    15
    Thanked 226 Times in 226 Posts
    Edited: No I still see uppercase LI, UL and A tags in that listmenu javascript.
    Code:
    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.
    Last edited by DrDOS; 11-05-2010 at 01:47 AM. Reason: still no fixed right

  • #12
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,332
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by hheyh222 View Post
    thanks very much! ive found the mistake.
    What was it?..dont just leave everyone hanging! lol

  • #13
    New Coder
    Join Date
    Sep 2010
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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?

  • #14
    New Coder
    Join Date
    Sep 2010
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    actually, never mind lol.
    I fixed that by adding another </div> after the menu.

    Im all good now, thanks for the help


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •