My Blog

Multiple File Upload plugin for jQuery and Cancel button - November 20th, 2008

QuocKien here ask me to help him with Multiple File Upload plugin and cancel button

This the most easy way I think

it’s this simple js code (cancel button will work for second multi input file)

$(document).ready(function(){
        $(’.multi’).MultiFile();
        $(’.multi2′).MultiFile();
       

         $("#cancel_but").click(function() {
            $(".multi2").parent().find(’span a’).each(function() {
                $(this).click();
            });
        })

});

where is .multi2 - it’s selector of your multi file input

simple html

<input type="file" class="multi" />
<input type="file" class="multi2" /><input type="button" value="cancel" id="cancel_but" />

 

I hope this help

Tags: ,

One Response to “Multiple File Upload plugin for jQuery and Cancel button”

  1. QuocKien Says:

    Hi,

    Thanks millions for your help. It works great and very surprised that the code is short. Thanks again.

    Cheers.
    Kien

Leave a Reply

authimage