getJSON not getting data from database -
function find() { var id = $('#id').val(); $.getjson("api/questionsanswer/" + id, function (data) { var str = data.username + ': $ ' + data.questions; $('#questionanswer').text(str); }) .fail ( function (jqxhr, textstatus, err) { $('#questionanswer').text('error: ' + err); }); }
i try data display "null: null" seems data.username , data.questions wasn't capture... wrong code??
Comments
Post a Comment