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 :-)