There is a javascript function below that uploads the selected file and updates the grid. It works perfectly in Firefox, but there seems to be an issue with IE11. The "ESignature/Registration" function within the addEventListener does not seem to execute. I placed a breakpoint at the Registration function, but it does not get triggered, resulting in the grid not refreshing. Any suggestions on how to resolve this problem?
$("#lnkAddAttachment").click(function (e) {
if (document.getElementById("txtFile").files[0] != null) {
oFiles = document.getElementById("txtFile").files[0];
nFiles = oFiles.size;
var selectedFile = document.getElementById("txtFile").files[0];
var xhr = new XMLHttpRequest();
var fd = new FormData();
var url = '@Url.Content("~/")' + "ESignature/getFile";
fd.append("file", document.getElementById('txtFile').files[0]);
$("#loadingwrapper").fadeIn();
xhr.open("POST", url, true);
xhr.send(fd);
xhr.addEventListener("load", function (event) {
var url = '@Url.Content("~/")' + "ESignature/Registration";
$('#gridAttachments').load(url + ' #gridAttachments');
$("#loadingwrapper").fadeOut();
}, false);
$('#txtDescription').val('');
$('#txtFile').val('');
return false;
}
});