I have a jquery code where i do this :
var resuSave = "";
$(".attachFile").each(function()
{
$.ajax({
url: monurl.php
type: 'POST',
data: myData,
type: 'POST',
success: function(data)
{
resuSave = resuSave.concat(data);
}
});
});
alert(resuSave);
But my variable resuSave
still alert an empty string. So i try to initialize resuSave
at "toto"
and do an alert of it in the success of my ajax request and their is "toto" in my alert. I also do an alert(data)
and it's print me some text. So i don't understand why this code don't want to put some text in my variable resuSave.