I have an aspx file, that has a javascript block containing the following button tag:
<pre lang="xml"><button id=btndelete{%=i%} data-file="{%=file.name%}" data-delete="2" onclick="alert('');confirmation(this.id, '{%=file.name%}')" class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
<i class="glyphicon glyphicon-trash"></i>
<span>Delete</span>
</button>
Where confirmation() is:
<pre lang="xml"><script type="text/javascript">
function confirmation(id, fileName) {
alert('confirmation started');
var deleteFile = confirm("Are you sure you want to delete '" + fileName + "' ?");
var btn = document.getElementById(id);
if (btn != null && deleteFile)
btn.setAttribute("data-url", btn.getAttribute("data-url") + "&delete=" + deleteFile);
alert('confirmation ended');
}
</script>
While testing the button on all browsers it worked perfectly, but on a single PC it didn't work using IE10, although on other PCs using same browser same code it worked. I added the alert() just for testing, and on this particular PC/IE10, the onclick event is not executed at all. I used F12 developer tools and I found that when I click this button the following error occurs:
SCRIPT7002: XMLHttpRequest: Network Error 0x2eff, Could not complete the operation due to error 00002eff.
Any ideas what might be causing that and how to fix it??