javascript - JQuery AJAX-How to retrieve JSON data from URL? -
i'm working on code need retrieve data api. idea json data , decode when have data, i've done before using file_get_contents , json_decode on php.
for detail:
i need code seat reservation user choose own seat.so made seat map table , "td" clickable. works fine except api thing. want when seat clicked/chosen retrieve data api.
i've tried:
$.getjson(jos, function(jd) { var hah = $.parsejson(jd); alert(jd); }); $.ajax({ url: jos, }) .done(function(data) { alert('data'); });
note: jos variable contains url api
i'll appreciate response
you don't need convert data $.getjson()
json, since json string:
$.getjson(jos, function(jd) { alert(jd); });
Comments
Post a Comment