PDA

View Full Version : anylinkmenu not working in IE8



bmackler
12-15-2011, 09:02 PM
1) Script Title: AnyLink JS Drop Down Menu v2.3

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.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

jscheuer1
12-15-2011, 11:12 PM
Here, in the menucontents.js file:


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.