jquery nested ajax success callback not working -
function getbyname(name) { $.ajax({ type: 'get', url: 'getprogress', datatype: "json", data: "name=" + name, success: function(data){ updateprogress(data, name); } }); } function updateprogress(data, name){ $.ajax({ type: 'get', url: 'getdesc', datatype: "json", data: "name=" + name, success: function(data){ alert('asdf'); } }); }
unable execute success callback of second ajax request. second ajax call executed successfully. server returns correct response success callback not getting executed. please help..
where "name" in function.?
function updateprogress(data){ $.ajax({ type: 'get', url: 'getdesc', datatype: "json", data: "name=" + name, success: function(data){ alert('asdf'); } }); }
add "name" in function parameter.
function updateprogress(data,name){ $.ajax({ type: 'get', url: 'getdesc', datatype: "json", data: "name=" + name, success: function(data){ alert('asdf'); } }); }
Comments
Post a Comment