I’ve recently been tasked with moving an intranet system from one, old server to a newer one. It uses a lot of the YUI library, as well as javascript/json which I have no experience with. When I try to load one of the pages (I can’t link you to it, as its intranet) I get an error like this: (I have tried to print out any variables or things incase that helps.
e: SyntaxError: parseJSON
o: [object Object]
data: undefined
This error is brought up from the following try/catch:
var loadData = function(data) {
if(data)
data += '&offset=' + offset;
else
data = 'offset=' + offset;
var callback = {
success: function(o) {
try {
var data = YAHOO.lang.JSON.parse(o.responseText);
} catch(e) { alert('e: ' + e + '\no: ' + o + '\ndata: ' + data}
I really don’t know what json is about, but im assuming it isn’t getting (the right) data from somewhere. Is the issue on this page or somewhere else?
Edit: I appreciate this may not be enough information required to troubleshoot, I don’t know anything about JSON/YUI, just tell me if you need to know something else.
You have to know what
o.responseTextis becauseobeingObjectdoesn’t really show what is the JSON string in question. Changing the alert to:might help diagnose the problem. No one can answer you whether the problem is is on that page or not unless you explain what is the JSON string and where it came from.