How do I display ajax response of my code? When I used async=true the yy value shown is only the last value; I need to show it for all value from 0 to a. It works fine with async=false. Here is my code:
for(var jj=0;jj<a;jj++){
var yy=jj;
var ins=12
var rou=13
/* */
$.ajax({
type:"GET",
url:"Select.php",
async:false,
data:"rou="+rou+
"&ins="+ins,
success : function(t){
$("#truk"+yy).text(t);
// Response not shown here
} //success
});
}
But anyway it is the result of the ajax call what you are searching for:
See it live here: http://jsfiddle.net/alligator/6MsuZ/