The below function works fine on Opera, Firefox and Chrome. However, in IE8 it fails on the if ( allowed.indexOf(ext[1]) == -1) part.
if ( allowed.indexOf(ext[1]) == -1)
Does anyone know w
If you're using jQuery, you can use $.inArray() instead.