Possible Duplicate:
IE 9 jQuery not setting input value
I would like to reset the input field if it matches some conditions using $(this).val("");
:
$(".checkimgextension").on("change", function () {
var file = $(this).val();
if (some conditions){
alert("wrong:...");
$(this).val("");
}
With Firefox the field is set to ""
, but with IE the field does not change as expected. Am using the right function .val("")
?
input type="file"
?