SCRIPT70: Permission denied IE9

2019-01-23 13:28发布

I am getting the strange error "SCRIPT70: Permission denied jquery.js, line 21 character 67" on IE-9. Searched on google but could not find anything except a bug on CKEditor.

Position it showed just contains following:

P=navigator.userAgent,xa=false,Q=[],M,ca=Object.prototype.toString,da=Object.prototype.hasOwnProperty,ea=Array.prototype.push,R=Array.prototype.slice,V=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Oa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Sa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];

anyone run into this error?

*Additional Info:*We open an iframe and call some javascript functions inside this iframe.

thanks.

9条回答
Deceive 欺骗
2楼-- · 2019-01-23 13:42

Facing a similar issue (maybe not with jquery.js but the same error description) the solution was a bit different from above. Actually I have searched for other iexplore.exe lines in regedit. I have found other two and changed it to 1 and it worked then.

hkey_local_machine\software\microsoft\internet explorer\main\featurecontrol\feature_protocol_lockdown 
hkey_local_machine\software\microsoft\internet explorer\main\featurecontrol\feature_internet_shell_folders
查看更多
成全新的幸福
3楼-- · 2019-01-23 13:47
function Sizzle( selector, context, results, seed ) {
  var match, elem, m, nodeType,

  // QSA vars
  i, groups, old, nid, newContext, newSelector;

  // MY EDIT - this try/catch seems to fix IE 'permission denied' errors as described here:
  // http://bugs.jquery.com/ticket/14535

  try{
    document === document; //may cause permission denied
  }
  catch(err){
    document = window.document; //resets document, and no more permission denied errors.
  }

  if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
    setDocument( context );
  }

  //...... snip .........//
}

http://jsfiddle.net/xqb4s/

查看更多
ら.Afraid
4楼-- · 2019-01-23 13:51

Tip from this one page should help: http://forum.jquery.com/topic/strange-behaviour-in-ie9

Make sure that HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_OBJECT_CACHING\iexplore.exe is not set to 0 (it should be 1 or missing)

查看更多
放荡不羁爱自由
5楼-- · 2019-01-23 13:51

If you run a 64-bit OS, make sure the value of this key is also set to 1: HKEY_LOCAL_MACHINE\SOFTWARE\**Wow6432Node**\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_OBJECT_CACHING\\iexplore.exe

Without this key we had random SCRIPT70: Permission denied errors in Internet Explorer 11.

查看更多
闹够了就滚
6楼-- · 2019-01-23 13:54

You cannot access any of your iframe's contents if it points to a different domain than the parent site.

查看更多
放我归山
7楼-- · 2019-01-23 14:05

Recently I encountered this error. In the application I am working, I'm using TinyMce text editor for our email composer. This creates an iframe which contains the objects I need for an email composer. After seeing many blogs about the said error, I tried to programmatically remove the TinyMce text editor object then triggered the redirection. And it WORKED!

查看更多
登录 后发表回答