Results 1 to 2 of 2

Thread: anylinkmenu not working in IE8

  1. #1
    Join Date
    Dec 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default anylinkmenu not working in IE8

    1) Script Title: AnyLink JS Drop Down Menu v2.3

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    3) Describe problem: works great in all browsers except IE8. I am getting an error that says


    Message: 'items[...].1' is null or not an object
    Line: 171
    Char: 3
    Code: 0
    URI: http://www.northatlanticpotash.com/anylinkmenu.js

    website url is www.northatlanticpotash.com

    thanks

  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

    Here, in the menucontents.js file:

    Code:
    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
    anylinkmenu1.items=[
    	["Who We Are", "about_who.html"],
    	["Management Team", "about_team.html"],
    	["Photos", "about_photos.html"],
    	["Careers", "about_careers.html"],
    	//no comma following last entry!
    ]
    Get rid of that red comma. Strict rules say no comma after the last item in an array. Most browsers error correct for this nowadays. IE started with IE 9. IE 8 is throwing an error because it's trying to create the markup for the next entry, but none is there, no text or link specified.

    The browser cache may need to be cleared and/or the page refreshed to see changes.
    - John
    ________________________

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

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
  •