Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
I have an aspx file, that has a javascript block containing the following button tag:
JavaScript
<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:
JavaScript
<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??
Posted
Updated 9-Apr-14 0:05am
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900