PDA

View Full Version : "AnyLink JS Drop Down Menu v2.2" Error



wizi
05-25-2010, 02:13 AM
Hi everyone,

I am using "AnyLink JS Drop Down Menu v2.2" (http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm) to create some drop down menus on my website. The scripts work perfectly on Firefox and Chrome BUT it doesn't work on IE8. I always get this error when I run it on IE 8


Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Timestamp: Tue, 25 May 2010 02:10:51 UTC

Message: 'items[...].1' is null or not an object
Line: 168
Char: 3
Code: 0
URI: file:///C:/Users/MINH/Desktop/VSA/VSA/scripts/anylinkmenu.js


Which is this line "frag+='<li><a href="' + menuobj.items[i][1] + '" target="' + menuobj.linktarget + '">' + menuobj.items[i][0] + '</a></li>\n'"


Please help!!!! How can I fix this error? I am new to javascript.

Thank your very much.

Site link: http://vsa.site90.com/

Erik_M
05-25-2010, 03:07 PM
Taken from http://stackoverflow.com/questions/615045/cascadingdropdown-error-options-is-null-or-not-an-object
The commenter on that post stated that autopostback = "false" instead of true(or default value?)fixed his error

wizi
05-25-2010, 03:49 PM
Taken from http://stackoverflow.com/questions/615045/cascadingdropdown-error-options-is-null-or-not-an-object
The commenter on that post stated that autopostback = "false" instead of true(or default value?)fixed his error

Thank you for your response but it still doesnt work for me.

I add autopostback = "false" in that function but it still doesnt work.

ddadmin
05-25-2010, 06:14 PM
Inside menucontents.js, there should be NO comma following the last array element of each menu contents. In other words,the code in red below should be removed:


anylinkmenuConnect.items=[
["About Us", "aboutus.php"],
["Our Sponsors", "sponsors.php"],
]

var anylinkmenuConnectSub={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu..." is a unique name!
anylinkmenuConnectSub.items=[
["About Us", "../../../aboutus.php"],
["Our Sponsors", "../../../sponsors.php"],
]

var anylinkmenuOfficersSub={divclass:'anylinkmenucols', inlinestyle:'', linktarget:'secwin'} //Third menu variable. Same precaution.
anylinkmenuOfficersSub.cols={divclass:'column', inlinestyle:''} //menu.cols if defined creates columns of menu links segmented by keyword "efc"
anylinkmenuOfficersSub.items=[
["Ricky Lin", "../../../officers/rickylin.php"],
["Mike Huynh", "../../../officers/mikehuynh.php"],
["Lisa Huynh", "../../../officers/lisahuynh.php"],
["Hien Nguyen", "../../../officers/hiennguyen.php"],
["Tin Nguyen", "../../../officers/tinnguyen.php", "efc"],


["Truy Tran", "../../../officers/truytran.php"],
["Jade Dewente", "../../../officers/jadedewente.php"],
["Ly-Van Nguyen", "../../../officers/lyvannguyen.php"],
["Vinh Phan", "../../../officers/vinhphan.php"],
["Tim Chung", "../../../officers/timchung.php", "efc"],

["Jeannie Tran", "../../../officers/jeannnietran.php"],
["Sophia Manguerra", "../../../officers/sophiamanguerra.php"],
["Cece Pham", "../../../officers/cecepham.php"],
["Kim Nguyen", "../../../officers/kimnguyen.php", ],
["Minh Bui", "../../../officers/minhbui.php"],

]


var anylinkmenuOfficers={divclass:'anylinkmenucols', inlinestyle:'', linktarget:'secwin'} //Third menu variable. Same precaution.
anylinkmenuOfficers.cols={divclass:'column', inlinestyle:''} //menu.cols if defined creates columns of menu links segmented by keyword "efc"
anylinkmenuOfficers.items=[
["Ricky Lin", "officers/rickylin.php"],
["Mike Huynh", "officers/mikehuynh.php"],
["Lisa Huynh", "officers/lisahuynh.php"],
["Hien Nguyen", "officers/hiennguyen.php"],
["Tin Nguyen", "officers/tinnguyen.php", "efc"],


["Truy Tran", "officers/truytran.php"],
["Jade Dewente", "officers/jadedewente.php"],
["Ly-Van Nguyen", "officers/lyvannguyen.php"],
["Vinh Phan", "officers/vinhphan.php"],
["Tim Chung", "officers/timchung.php", "efc"],

["Jeannie Tran", "officers/jeannnietran.php"],
["Sophia Manguerra", "officers/sophiamanguerra.php"],
["Cece Pham", "officers/cecepham.php"],
["Kim Nguyen", "officers/kimnguyen.php", ],
["Minh Bui", "officers/minhbui.php"],

]

IE is picky about such things.

wizi
05-25-2010, 09:32 PM
It works. Thank you admin.
Sorry about hijacking the same threads.