I'm having a problem with this function:
var url = "";
function multiSearchTest() {
var formData = $("#frmSearch").serialize();
var look = new Array("SDO", "AR", "AS", "AC", "AP", "GEMO", "CC");
var count;
for(count = 0; count < look.length; count++){
url = "index.php?Page&module=mod_page&action=dispatch&todo=cerca"+look[count]+"&" + formData;
console.log(url);
var test = "#"+look[count]+"result";
$.get(url, function(data) {
$(test).html(data);
console.log("TEST VAL => " + test);
});
}
}
As you can see the url construction is perfect...but when I say where to print the output it return me only the last val of the array. Any ideas or suggestion? Where is my mistake?