Hi! I dont submit the from via ajax, because i dont works :-). The Page reloads not until the file has been uploaded completely. So I can check the progress in a loop. Is the file too smal, it uploads so fast, that you cant see it. Is the file too big, the server doesn't accept it. Check your php.ini an checks the hidden-field "MAX_FILE_SIZE" :-)
greetz On 19 Okt., 10:07, Giovanni Battista Lenoci <[EMAIL PROTECTED]> wrote: > micha149 ha scritto: > > > 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; > > }); > > }); > > Hi mike thank you for your code, but in this way you aren't submitting > the form via ajax, right? > > How can it works? if you don't use ajax the page reloads and the > getProgress can't be called. > I tried and It makes only one request that remain in pending... > > When you'll have more time can you post the entire code? > > Thank you very much again :-)