| Page 1 of 1 | [ 2 posts ] |
|
Hi There,
I'm a web developer for a company and have to migrate a bespoke site from one server to another. I've partially got it working yet when I log into it, I get an alert telling me to contact IT. Obviously I can't do this, and the ex-developers implemented this. I hoped you guys could tell me whats going wrong in the javascript code, as I don't understand it. the code is: Code: var theMenu; window.onload = function() { theMenu = new YAHOO.widget.MenuBar("theMenu", { autosubmenudisplay: true, hidedelay: 750, lazyload: true, iframe: true }); var callback = { success : function (o) { try { var aItems = YAHOO.lang.JSON.parse(o.responseText); renderMenu(aItems); } catch(x) { alert('[b]There is an error with your menu data, contact IT[/b].'); } }, failure : function (o) { if (!YAHOO.util.Connect.isCallInProgress(o)) { alert('Error retreiving menu data, contact IT.'); } } }; I have bolded the error that comes up. Thanks |
|
I'd guess that the YAHOO.lang.JSON.parse() function is throwing the exception. Open the page in Firebug and look at the value of o.responseText. If it's not JSON, that's your problem.
|
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group