php - JavaScript: Uncaught TypeError: jQuery.toJSON is not a function -
i have tournament bracket found , import our vbulletin software.
the script works outside of vbulletin, when import receive above error.
function savefn(data, userdata) { var json = jquery.tojson(data); $.post("?tid="+ retparam("tid") +"&secretmode="+retparam("secretmode"), {'data':json}); }
it's been driving me crazy, believe vbulletin in strict mode can't seem find problem.
working: http://doghousesocial.com/area51/brackets.php?tid=1&secretmode=inlanadminmode
you should use native json functions available in modern browsers (https://developer.mozilla.org/en-us/docs/web/javascript/reference/global_objects/json)
switch this, eliminate error:
var json = json.stringify(data);
i'm not sure why jquery.tojson(data)
work outside $.tojson not function of jquery. why error came up.
Comments
Post a Comment