i built the please wait gif animator for my form submission, because the registration takes a bit more time.
now everything works fine, but my gif animation still keeps running even after success message. Thus my animation function is still running. how can i kill that function?
this is what i did now:
function loadSubmit(){
ProgressImage = document.getElementById('progress_image');
document.getElementById("progress").style.visibility = "visible";
setTimeout("ProgressImage.src = ProgressImage.src",100);
return true;
}
and i call this before my ajax function:
loadSubmit();
$.ajax({
url: "/register_me/",
type: "POST",
...
}).done(function(){
// can i somehow kill loadSubmit() function in this scope?
});
this would be so good to be able to do it..
thanks a lot
document.getElementById("progress").style.display = "none";setTimeout("ProgressImage.src = ProgressImage.src",100);supposed to do, exactly? Passing a string tosetTimeoutseems strange to begin with (I didn't know you could do that), and besides that the string contains code that looks like a no-op.