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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -