I think it must work. Bu i'n not an yui man. I make it with jQuery:

$(document).ready( function() {
          // define the check progress function
          var getProgress = function() {
      $.ajax({
              type: "GET",
              url: document.URL + getUniqueID(), //
              data: "id=" + $('#upload_form
[EMAIL PROTECTED]"UPLOAD_IDENTIFIER"]').attr('value'),
              success: function(strResponse){
                // Wenn der Request erfolgreich war, werden die Daten aus dem
XML geholt
                var ajaxProgress = $("percent", strResponse).text();
                var ajaxMessage = $("message", strResponse).text();
                $('#upload_progress .bla').text(ajaxMessage + ": " +
ajaxProgress + '%');
                // Calculate width of progressbar in blocks of 8px
                progressWidth = Math.ceil(12/100*ajaxProgress)*8;
                $('#upload_progress .progress_bar').css('width',
progressWidth + 'px');
              }
            });
            setTimeout(getProgress,1000);
          }

  $('#upload_form input:submit').click(function() {
          // call check progress function
          getProgress();
          $('#upload_dialog').hide();
          $('#upload_progress').show();
          $('#upload_form').submit();
          return false;
  });
});

in php i use the upload_progress module from PECL....

greetz mike

On 18 Okt., 17:20, Giovanni Battista Lenoci <[EMAIL PROTECTED]> wrote:
> Hi mike thank for your answer... now I'm still tryng to make it work
> with the progress bar... I think I'm really near to the solution, but
> I need your help...
>
> The code from I'm ispiring is this one:
>
> http://progphp.com/progress.phps
>
> In this code (that use yui) the function that submit the form via ajax
> is called in the onsubmit event, and this function after the submit of
> the form calls the update_progress() functions that calls a page that
> return the state of the upload.
>
> The success method of your plugin is invoked when the action page
> receive all the data, right?
>
> What I think I need is to call this function when the submit is
> invoked, but before "success" methods of your plugin. There's a way I
> can achieve it?
>
> Thank you
>
> On Oct 18, 3:24 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
>
> > Giovanni,
>
> > The form plugin offers no support for tracking upload progress.  But
> > Alexandre has a file upload plugin that uses flash to provides this
> > capability:
>
> >http://www.pixeline.be/experiments/jqUploader/
>
> > Mike
>
> > On 10/18/07, Giovanni Battista Lenoci <[EMAIL PROTECTED]> wrote:
>
> > > On Oct 18, 2:06 pm, micha149 <[EMAIL PROTECTED]> wrote:
> > > > I have the same Problem to.... The Plugin loads the file succesfully
> > > > to the server. I can trac it with the php modul "upload progress" to.
> > > > But it doesent appear in $_FILES. All other form fields are listet in
> > > > $_POST corectly.
>
> > > Hi Michael, can you post an example for tracking the upload progress,
> > > I've googled around but I've find only examples with yui and I'm a
> > > little bit confused...
>
> > > Thank you

Reply via email to