i have the same json string twice but the second time i get an error.
{"data":[{"ServerID":"1","UserID":"3","Name":"salzig","State_since":"2012-11-23T23:16:27.458000000","State":"saved","UUID":"Hardware 85f5d278-f6d6-49c2-87e7-c249d8002897"}],"error":[null,null,null]} devcontrol.js:8
{"data":[{"ServerID":"1","UserID":"3","Name":"salzig","State_since":"2012-11-23T23:16:27.458000000","State":"saved","UUID":"Hardware 85f5d278-f6d6-49c2-87e7-c249d8002897"}],"error":[null,null,null]} devcontrol.js:8
Uncaught TypeError: Object function (E,F)} has no method ‘parseJSON’ devcontrol.js:9
my code line devcontrol.js 8 and 9:
console.log(data);
data = $.parseJSON(data);
how can that be.
update
i now made a console.log($) evry trime bevor he trys to convert the string into a json and got
undefined
it turnd out the secounde time it’s undefined.
i managed to found out it was because of zfdebug they used document ready and then asked about jquery noconfilect thats why $ was undifend the secound time
Is telling you that the object you’re referencing with the
$variable has no method called that. This could be caused by a few things.parseJSONwas introduced in version 1.4.1. Either update your version, or use the nativeJSON.parse()method.jQueryis wrong. Checked the page loaded the source script with a200 success$variable after jquery has defined it. You can disassociate jQuery from the$variable usingjQuery.noConflict(), reassign to anothe variable like$$, or just usingjQuery.parseJSON()$(document).ready(function () { /*your code here*/ });