0
Where is a bug? (I showed error message)
function salom (url, name, data) { var str = ''; $.each(data.split('.'), function(k,v) { str += '&' + v + '=' + $('#' + v).val(); }); $.ajax ({ url: '/' + url, type: 'POST', data: name + '_f=1' + str, cache: false, success: function (result) { obj = jQuery.parseJSON(result); if (obj.go) go(obj.go); else alert(obj.message); } }); } function go (url) { window.location.href='/' + url; } error: SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 11 of the JSON data
1 Antwort
+ 1
Your JSON response is apparently broken.