Dear all,
We've made an ajax upload form attaching multiple files. Now, we would
like that the user can stop the attaching process of file by clicking
on a link.
Unless I've missed a new kind of hack, there is no way to upload a file
via Ajax. So assuming you are working with a iframe you can try
something like this:
$('iframe')[0].location.href = '404.html';
But if you really need to make sure that cancel will cause *no file* to
be uploaded, you need to have a rollback mechanism where every upload
has a unique id and you can send an Ajax call to the server causing that
tells the server "Block processing or delete the uploaded files
associated with id: xyz". This of course would be a little more complex,
but as you cannot know whether an upload is already been processed by
the server when the user hit's cancel, it's necessary.
Good luck with it,
Felix
--------------------------
http://www.thinkingphp.org
http://www.fg-webdesign.de
Roberto Ortelli wrote:
Dear all,
We've made an ajax upload form attaching multiple files. Now, we would
like that the user can stop the attaching process of file by clicking
on a link.
How can we kill an ajax call with jQuery?
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/