Where is a bug? (I showed error message) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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

24th Nov 2017, 6:02 PM
Nodirbek
1 Answer
+ 1
Your JSON response is apparently broken.
1st Dec 2017, 11:23 PM
Private [GER]
Private [GER] - avatar