SCRIPT70: Permission denied IE9

后端 未结 9 1386
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 08:40

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

相关标签:
9条回答
  • 2020-12-14 08:49

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

    0 讨论(0)
  • 2020-12-14 08:51
    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/

    0 讨论(0)
  • 2020-12-14 08:52

    The SCRIPT70 error in IE9 occurs most likely when your iframe is calling some javascript (especially if it affects the parent page - e.g. hash change of parent url)

    Check that your iframe's host/protocol/port number matches. IE9 is exceptionally strict about the host name(down to the www portion in my case) and document.domain did not seem to provide a workaround for that.

    Encountered this issue and fixed it while dealing with multiple iframes, hope this helps others with the same issue.

    0 讨论(0)
  • 2020-12-14 08:55

    If you are dealing with select element in your script maybe your problem is like mine

    SCRIPT70: Permission denied when adding options to select element from a recently closed iframe

    0 讨论(0)
  • 2020-12-14 09:00

    I was having this exact problem with IE9 and in fact, it happens with IE11 as well.

    My problem was I was opening a website via http (i.e. http://mywebsite.com) and an iframe within my code was trying to access a portion of the website using https. This was causing the error. Once I accessed the website using https, the error went away. A old bookmark was the cause of it using http and the site had been updated with https so check your URLS.

    0 讨论(0)
  • 2020-12-14 09:01

    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
    
    0 讨论(0)
提交回复
热议问题