sadik7266 / jquery-multifile-plugin

Automatically exported from code.google.com/p/jquery-multifile-plugin
0 stars 0 forks source link

If the onFileSelect trigger event returns false, the value of the file input should reset / clear (code snippet) #51

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

Here is a code snippet that will clear the value of the hidden field if the 
onFileSelect event is 
triggered and returns false:

//# Trigger Event! onFileSelect
 if (!MultiFile.trigger('onFileSelect', this, MultiFile)) {
            $(MultiFile.current).val('').attr('value', '')[0].value = '';
            return false;
          }
 //# End Event!

This is helpful if you're using the onFileSelect event to perform validation of 
filename characters, for 
example.

Original issue reported on code.google.com by fitzpatr...@gmail.com on 14 Sep 2009 at 7:48

GoogleCodeExporter commented 8 years ago
The project has been dormant for over a year and many of the support requests 
have been resolved and/or are invalid. So we're going to archive them all, 
pending review.

If you're still having a problem with the plugin, please visit the project page 
and re-open the issue. We do apologize for any inconvenience this may cause, 
but please bear with us...  we'll be making improvements to the plugin and its 
documentation over the coming weeks.

Stay tuned; and thanks for your support!

The Fyneworks Team
http://twitter.com/fyneworks

Original comment by fyneworks on 26 Jan 2012 at 1:37