Welcome Guest, Not a member yet? Register   Sign In
Progress Bar when file upload
#1

[eluser]yannyannyann[/eluser]
Hello

I have a jquery ajax upload system that works well.
However as I am uploading big files I would like to display a progress bar, or a simple percentage value, for the user to see that the upload didn't crash.

How could I implement that in my code ?

Code:
jQuery("#addVideoForm").validate({
        rules: {
            userfile: {
                  required: true,
                accept: "mov|avi|mpg|flv"
            }
        },
        submitHandler: function(form) {
            jQuery(form).ajaxSubmit({
                target:        '#positive-result',  
                beforeSubmit:  showRequest,
                success:       showResponse  
            });
        }
    function showRequest(formData, jqForm, options) {
        $('#result').fadeIn("slow");            
        $('#positive-result').html("Uploading...");
        var queryString = $.param(formData);
        return true;
    }

    function showResponse(responseText, statusText)  {    
        
        $('#positive-result').html( 'Video added.');
        $('#result').fadeIn("slow");    
    }
    });


Messages In This Thread
Progress Bar when file upload - by El Forum - 04-22-2009, 06:16 AM
Progress Bar when file upload - by El Forum - 04-22-2009, 06:54 AM
Progress Bar when file upload - by El Forum - 04-22-2009, 10:05 AM
Progress Bar when file upload - by El Forum - 04-22-2009, 10:22 AM
Progress Bar when file upload - by El Forum - 04-22-2009, 10:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB