I have this code :
data = new FormData($('#form')[0]);
$.ajax({
type: 'POST',
url: 'systems/createpostsystem.php',
data: data,
cache: false,
contentType: false,
processData: false
}).done(function(data) {
alert(data);
window.location = "myposts.php";
});
I have used $.ajaxStart()
and it didn't do what I want.
Also I tried success:function(){my code}
and made my request twice !
Now I want to show a progress image while this AJax complete.