jquery - resend ajax request changing only one attribute -
i want make ajax request in success function need pass different 'guidlist'.
$.ajax({ url: "my.ashx", datatype: 'json', type: 'post', data: { cmd: 3, //poll database job status guidlist: guidlist }, success: function(){ $.ajax(this);<-all same except need change passing in guidlist } })
create function send request - recursively call inside success
handler. careful though avoid infinite loops.
function sendrequest(param) { $.ajax({ url: "my.ashx", datatype: 'json', type: 'post', data: { cmd: 3, //poll database job status guidlist: param }, success: function(){ if(param == [something]) sendrequest(newparam); } }); } sendrequest(guidlist);
Comments
Post a Comment