1

I'm using

$(upload_button).bind('change', function(event) 
{
    var files = this.files;
    alert(typeof(files));
    if(typeof(files)!='undefined')
    {


    }
});

in my code with jQuery which is working fine in Firefox and Chrome but not in IE8(i.e., IE returns undefined for files.length, whereas others returns the value). So do anybody know how to resolve this?

Stranger
  • 10,332
  • 18
  • 78
  • 115

2 Answers2

1

From jQuery API. change event will not work with button as I am assuming upload_button is button.

Anoop
  • 23,044
  • 10
  • 62
  • 76
1

That's because Internet Explorer, even IE9 does not support HTML5 File API and therefore it returns undefined value for files property.

Ram
  • 143,282
  • 16
  • 168
  • 197