Timeline for jQuery - INPUT type=File , Image FileType Validation options?
Current License: CC BY-SA 2.5
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 29, 2013 at 9:45 | comment | added | Maurice |
For googlers; AFAIK not all browsers allow you to reset a file input's value. The most elegant crossbrowser solution I have found is element.wrap('<form>').closest('form').get(0).reset(); element.unwrap();
|
|
Sep 13, 2012 at 9:16 | review | Suggested edits | |||
Sep 13, 2012 at 9:24 | |||||
Nov 29, 2010 at 22:48 | vote | accept | AnApprentice | ||
Nov 19, 2010 at 6:50 | comment | added | Jess Telford | .val(''); is a jQuery call, and all it does is set the value attribute of the element to be '' - which is the same is was on page load. | |
Nov 19, 2010 at 6:49 | history | edited | Jess Telford | CC BY-SA 2.5 |
updated example code based on comment
|
Nov 19, 2010 at 6:44 | comment | added | AnApprentice | Adding this worked, ".val('');" but I don't know how compliant that is... anyone? | |
Nov 19, 2010 at 6:42 | comment | added | AnApprentice | .change works. But it's still no good, as while it errors, it still selects and is showing the file on the page. | |
Nov 19, 2010 at 6:40 | comment | added | AnApprentice | Uncaught TypeError: Object #<an Object> has no method 'onchange' | |
Nov 19, 2010 at 6:13 | history | answered | Jess Telford | CC BY-SA 2.5 |