IE permission denied

浪子不回头ぞ 提交于 2019-12-06 04:22:20

问题


I am getting permission denied error on IE (firefox it works fine)

I am making an ajax call (local domain) and result of the call I am assigning to a div. On debugging I came to know there is no issue with ajax call and variable 'result' has the result data. Error is thrown when data is being assigned to div.

Error Line: 2 jquery-1.8.1.min.js Error: Permission denied

Javascript code:

$.get('administration.htm', function (result) {
    $('#adminDiv').find('#content').html(result);
});

Any idea why this error is coming.


回答1:


The permission denied error could be coming from trying to manipulate the DOM before the document is ready.

As for the events and formatting no longer working, using JavaScript and jquery to select things can cause issues. When you use document.getElementById it will update the DOM and the rendered page but it will not update the associated jQuery objects. To solve this you either need to re-generate the jQuery object (using $('selector')) and reattach the handlers or try something like $(document.getElementById('objectId')).html('result'); where you use javascript to find the DOM element to avoid the permission error then modify it using the associated jQuery object.



来源:https://stackoverflow.com/questions/17403520/ie-permission-denied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!