Results 1 to 6 of 6

Thread: Chrome Menu Null Error

  1. #1
    Join Date
    Sep 2009
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Chrome Menu Null Error

    Hello- I'm working with the Chrome Menu, here...
    http://www.dynamicdrive.com/dynamici...rome/index.htm

    It works fine, here...
    http://www.healthtek.com/

    ...but, there is an error in my version of the menu. I have no idea how fix this, or why my version has the error.

    Error Line 176: 'document.getElementById(...)' is null or not an object

    Any ideas would help, thx.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Where you have:

    Code:
    <!-- InstanceBeginEditable name="footscripts" -->
    <script type="text/javascript">
    cssdropdown.startchrome("chromemenu", "chromemenu2")
    
    
    swfobject.registerObject("FlashID");
    
    </script><!-- InstanceEndEditable -->
    
    </body>
    <!-- InstanceEnd --></html>
    Since you only have one menu, you are telling it to look for a non-existent "chromemenu2". Change it to:

    Code:
    <!-- InstanceBeginEditable name="footscripts" -->
    <script type="text/javascript">
    cssdropdown.startchrome("chromemenu");
    
    
    swfobject.registerObject("FlashID");
    
    </script><!-- InstanceEndEditable -->
    
    </body>
    <!-- InstanceEnd --></html>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    notevenanoob (09-28-2009)

  4. #3
    Join Date
    Sep 2009
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    That did the trick. I was hoping it would be something easy.
    THX

  5. #4
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default IE chrome null error... different problem?

    Hi John:
    i see this post re: null error for chrome is a bit old, but i'm having the same problem with IE (works fine in FF), but I had deleted the second menu from the script so that is not the problem ...

    i am getting:

    Webpage error details

    Message: 'document.getElementById(...)' is null or not an object
    Line: 176
    Char: 3
    Code: 0
    URI: http://www.tjmatelson.com/Bear2/chrome.js

    page I'm working on:
    http://www.tjmatelson.com/Bear2/thelodge.html

    I'm stumped
    hope you can help me out with this..
    thank you
    Teri

  6. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by tmate View Post
    Hi John:
    i see this post re: null error for chrome is a bit old, but i'm having the same problem with IE (works fine in FF), but I had deleted the second menu from the script so that is not the problem ...
    You're right, that's not the problem. There's an error in the HTML markup. Firefox is error correcting it. IE is not. Here it is:

    Code:
    </head>
    <body>
    <div id="wrapper">
    <div id="top"
    <div class="chromestyle" id="chromemenu">
    <ul>
    <li><a href="reservations.html">Reser . . .
    See? No closing > for that div tag. It should be:

    Code:
    </head>
    <body>
    <div id="wrapper">
    <div id="top">
    <div class="chromestyle" id="chromemenu">
    <ul>
    <li><a href="reservations.html">Reser . . .
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #6
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default once again, problem solved

    John Scheuer found the problem....

    <div id="top"


    notice anything?
    yep... a missing closing carrot...
    darn.

    many thanks to John

Bookmarks

Posting Permissions

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