I have jQuery function to validate the file extension of the uploaded file. If the the file does not belong to a desired file extensions then a validation message will be shown and I will clear the value of File Upload
via jQuery as
$('#ctl00_ContentPlaceHolder1_FileUpload').val("")
It is working fine in modern browsers but not in IE 8. I also tried
document.getElementById('ctl00_ContentPlaceHolder1_FileUpload').value = ''
but not working also. my full code is
if ($.inArray(ext, ['gif', 'png', 'jpg', 'jpeg', 'bmp']) == -1) {
alert('Image must be .jpg/.jpeg/.gif/.bmp/.png only.');
$('#ctl00_ContentPlaceHolder1_FileUpload').val("");
document.getElementById('ctl00_ContentPlaceHolder1_FileUpload').value = '';
$("#ctl00_ContentPlaceHolder1_FileUpload").focus();
}