rortk1 / jquery-multifile-plugin

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

onFileSelect - returning false leaves file in element #197

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

What steps will reproduce the problem?

1. Add an onFileSelect event that returns false.
2. Select a file.

What is the expected output? 

No file to be selected.

What do you see instead?

The file is not displayed in the multifile format, but it is still selected in 
the original element and gets submitted with the form.

To fix this I add:

$(element).val("");

What version of the plugin/jQuery are you using?
PLUGIN VERSION: 1.48
JQUERY VERSION: 1.6

On what browser(s) or operating system?
BROWSER(S):

fx30

Please provide a link to where the problem can be observed:
URL:

Feel free to provide any additional information below.

Original issue reported on code.google.com by jamiekit...@gmail.com on 12 May 2014 at 11:27

Attachments:

GoogleCodeExporter commented 8 years ago
That behaviour indicates the plugin has not been initialized on that element. 
What code are you using to initialise the page? 

ps.: have you considered using the new version of the plugin?
http://www.fyneworks.com/jquery/multifile/

Original comment by diego.a...@gmail.com on 12 May 2014 at 11:44

GoogleCodeExporter commented 8 years ago
I have an alert in the onFileSelect event, so I know it is running.

In the new version returning false doesn't seem to function at all, ie, the 
file gets added regardless.

Original comment by jamiekit...@gmail.com on 12 May 2014 at 12:00

GoogleCodeExporter commented 8 years ago
Ok, the new version does what I was trying to do anyway, checking the file 
size. Thanks

Original comment by jamiekit...@gmail.com on 12 May 2014 at 12:22

GoogleCodeExporter commented 8 years ago
Great! If you need any help give us a shout.
And keep an eye on the new project page for future reference:
http://github.com/fyneworks/multifile

Original comment by diego.a...@gmail.com on 12 May 2014 at 12:42