<input type="file" name="file" id="file" style='visibility: hidden;' name="img" onchange="fileSelected();"/>
pre-requisites : windows 7 service pack 1
source : [http://lifehacker.com/5960175/ie-10-release-preview-available-now-for-windows-7?utm_campaign=socialflow_lifehacker_twitter&utm_source=lifehacker_twitter&utm_medium=socialflow]
I have spent sometime to get the file input element reset correctly while I was developing a HTML5 application. I have found several ways of doing it while I was researching, but most of them were not worked as I expect. The below mentioned piece of jquery code worked fine in several desktop as well as mobile browsers. So I thought of sharing it.
works with Chrome, FireFox, Opera ,Safari and IE10 and above
works with below IE10