Is it possible to clear an <input type='file' />
control value with jQuery? I've tried the following:
$('#control').attr({ value: '' });
But it's not working.
Is it possible to clear an <input type='file' />
control value with jQuery? I've tried the following:
$('#control').attr({ value: '' });
But it's not working.
This works for me.
http://forum.jquery.com/topic/how-to-clear-a-file-input-in-ie
Hope it helps.
I was able to get mine working with the following code:
it does not work for me:
so in asp mvc I use razor features for replacing file input. at first create a variable for input string with Id and Name and then use it for showing in page and replacing on reset button click:
What? In your validation function, just put
Assuming upload is the name:
I'm using JSP, not sure if that makes a difference...
Works for me, and I think it's way easier.
its works for me in every browser.