Hi, have a problem with .load() i hope you guys can give me a hand.
The following list
- File 1 | 0% | Process
- File 2 | 0% | Process
each file is a xls file with 10000 or more cells to process
Process is a link, with the following code.
- <a href="process.php?4a7af260640d6b198e846d58e69037224.xls" onclick="procesa_archivo(this.href, 4); return false;">Process</a>
The
procesa_archivo function is as follows
- function procesa_archivo(url, id) {
- $("#archivo_"+id).html("<img src='/images/indicator.gif' />");
- $("#archivo_"+id).load(url, null, function() {
- $("#archivo_"+id).html('Finalizado');
- });
- actualizaBarra(id);
- }
The idea is, when i click the link, the link itself changes for an indicator, the file gets procesed (contents to a database, with is made by
process.php), and another function "actualizaBarra(id)", wich updates the 0% part every 2 seconds, when the processing part finishes, the indicator is replaced with the word "Finalizado".
Everything works really really great, except that when i close the page (tab or window) or change the address the file keeps processing, and the data keeps entering the database, since i don't think there is a "stopLoad" (didn't found it in the documentation) function, i've a really big problem because if in the middle of the process i realize that i uploaded the wrong file o simply want to stop... i can't do it.
I've tried it with FF 3.0, 3.5 and 3.6, chrome, IE7 and IE8. But everytime it happens the same thing. I need to be able to stop the process somehow.
Thanks, and i hope you can help me.
I forgot to mention, i'm using the jquery ui bundle: jquery-1.3.2.min.js and jquery-ui-1.7.2.custom.min.js