Bug Tracker

Changes between Initial Version and Version 1 of Ticket #10365


Ignore:
Timestamp:
Oct 2, 2011, 9:16:34 AM (9 years ago)
Author:
jaubourg
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10365

    • Property Status changed from new to assigned
    • Property Component changed from unfiled to ajax
    • Property Priority changed from undecided to low
    • Property Milestone changed from None to 1.next
    • Property Owner set to jaubourg
  • Ticket #10365 – Description

    initial v1  
    11I wanna know if you have some api of progress event on sending XMLHttpRequest. I have used one example of https://developer.mozilla.org/En/XMLHttpRequest/Using_XMLHttpRequest to do the function on the ajax core on jquery.min.
    22I think its a good sugestion to do that in the next jquery version.
     3
     4{{{
     5
    36// Do send the request
    47// This may raise an exception which is actually
     
    69//  Progresso de upload
    710var divporcentagem = $j("#porcentagem");
    8 function onProgress(e) { 
    9 var percentComplete = ( (e.loaded / e.total)*100 ).toFixed(0);
    10                                                     divporcentagem.empty();
    11                                                     divporcentagem.append(percentComplete+"%");
     11
     12function onProgress(e) {
     13  var percentComplete = ( (e.loaded / e.total)*100 ).toFixed(0);
     14  divporcentagem.empty();
     15  divporcentagem.append(percentComplete+"%");
    1216
     17
    1318xhr.upload.onprogress = onProgress;
    1419xhr.send( ( s.hasContent && s.data ) || null );
     20
     21}}}
    1522
    1623I think its not possible to atach lik a complete:function{} or success.