I have html:
<form id="fileuploadform">
<input type="file" id="fileupload" name="fileupload" />
</form>
and jquery:
$(':file').change(function(){
var file = this.files[0];
...
});
The problem is: the change function fires only when the file selection is different than the selection made previously. That is of course the meaning of the 'change' event. I want my function to be called with the file dialog closes, no matter what.
I tried using 'select' event -- it never gets called
I also tried:
$(':file').bind('dialogclose', function(event) {
alert('closed');
});
and:
$(':file').live("dialogclose", function(){
alert('closed1');
});
They didn't work either.