I want to know how to pass value from ajax function to another ajax I've tried this code but It does not work. Anyone know how to do it the right way? Thanks!
$("#button").click(function(){
var passedValue = '';
$.ajax({
url://
type://
success:function(data){
if(typeof==="object"){
for(var i=0;i<data.length;i++){
passedValue = data[i]["passedThis"];
}
}
}
});
$.ajax({
data: { receivedPassed: passedValue;}
});
});