Don't seem to be able to get this to work and not too sure why, for reference using JQuery 1.6.2.
I'm trying the below code:
$("#imageUpload input").live('change', function() {
var fileName = $(this).val();
var fileExt = fileName.split('.').pop();
var indexPos = $(this).parent().index();
var currId = $(this).attr('id');
// check extensions and if invalid replaceWith the input to clear
});
IE 6 - 9 no luck whatsoever (nothing in the function gets called), Firefox it works flawlessly. I did a bit of reading and read the live + change issue with IE was fixed in version 1.4+ of JQuery. Also have exactly the same issue using Delegate?
Any help appreciated.
Is this an issue with IE and the file input type?