Results 1 to 2 of 2

Thread: Ext JS app in iframe in Firefox 4 gives "Permission denied..." onDomLoad

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member devtig's Avatar
    Join Date
    Jan 2010
    Location
    Rotterdam, The Netherlands
    Posts
    422

    Exclamation Ext JS app in iframe in Firefox 4 gives "Permission denied..." onDomLoad

    I have the simplest page iframing the simplest Ext JS 3.4.0 app, that sometimes gives an error when I load the outer page in Firefox 4.0.1 with Firebug 1.7.2. enabled

    Outer page:
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <body>
    <iframe src="test.html" width="50" height="50"></iframe>
    </body>
    </html>
    iframed page: test.html
    HTML Code:
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="extjs/3/4/0/resources/css/ext-all.css"/>
        <script type="text/javascript" src="extjs/3/4/0/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="extjs/3/4/0/ext-all-debug.js"></script>
    </head>
    <body>
    </body>
    </html>
    The error I get is: Permission denied to access property 'toString'

  2. #2
    Ext JS Premium Member devtig's Avatar
    Join Date
    Jan 2010
    Location
    Rotterdam, The Netherlands
    Posts
    422

    Default Solution posted somewhere else

    The function testPlayerVersion() is where the error is actually occuring:

    Code:
    function testPlayerVersion() {
      var b = doc.getElementsByTagName("body")[0];
      var o = createElement(OBJECT);
      o.setAttribute("type", FLASH_MIME_TYPE);
      var t = b.appendChild(o);
      if (t) {
        var counter = 0;
        (function(){
          if (typeof t.GetVariable != UNDEF) { 
    Red line is the line where the error occurs.
    Purple is what I think is the root cause.

    Somebody posted a solution (comment 6 and 11) on http://code.google.com/p/swfobject/issues/detail?id=481 :

    The solution should be:
    1) change the order of the DOM manipulation; if setAttribute is invoked AFTER o has been appended to document.body, the error disappears.

    o.setAttribute("type", FLASH_MIME_TYPE);
    var t = b.appendChild(o);

    changes to

    var t = b.appendChild(o);
    o.setAttribute("type", FLASH_MIME_TYPE);

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •