Results 1 to 3 of 3

Thread: ext codes error within iframe

  1. #1
    Ext JS Premium Member
    Join Date
    Feb 2010
    Location
    Vancouver, BC
    Posts
    224
    Vote Rating
    1
      0  

    Default ext codes error within iframe

    Each page renders fine (if you remove iframe from test1.html)
    but soon as you put iframe in the test1.html, error popups (happens in IE only)

    var Ext = Ext || {};
    (function() {
    var global = this,
    objectPrototype = Object.prototype, => Object is undefined here

    If you let the code to continue, it renders fine though.


    test.html
    Code:
    <script type="text/javascript" src="/enteliweb/javascript/ext4/ext-all-debug.js"></script>
    
    
    <script type="text/javascript">
    //Initialization
    Ext.onReady(function()
      {
    
    
        var myBorderPanel = Ext.create("Ext.container.Viewport",
          {
            layout: "border",
            margin:"0 0 0 0",
            defaults:{border:false,header:false,defaults:{border:false}},
            items: [
              {
                id:"centerPanel",
                region: "center",     // center region is required, no width/height specified
                margins: "0 5 0 0",
                layout:"border",
                autoScroll:false,
                items:  {
                      id:"mainFramePanel",
                      html:"<iframe id=\"mainFrame\" name=\"mainFrame\" scrolling=\"auto\" frameborder=\"0\" src=\"test2.html\"></iframe>",
                      frameborder:"0",
                      autoMask:false
                    }
              },
              {
                    region: "east",
                    id:"east-region",
                    collapsible: true,
                    collapseMode : "mini",
                    split: true,         // enable resizing
                    maxWidth: 500,
                    width: 320,
                    html:"xxx"
    
    
                  }]
          });
    
    
      });
    
    
    
    
    //]]>-->
    </script>

    test2.html
    Code:
    <script type="text/javascript" src="/enteliweb/javascript/ext4/ext-all-debug.js?1.2.245"></script>
    <script type="text/javascript">
    //<!--/*--><![CDATA[/*><!--*/
    
    
    //Initialization
    Ext.onReady(function()
      {
    
    
        var myBorderPanel = Ext.create("Ext.container.Viewport",
          {
            layout: "border",
            margin:"0 0 0 0",
            defaults:{border:false,header:false,defaults:{border:false}},
            items: [
              {
                id:"centerPanel",
                region: "center",     // center region is required, no width/height specified
                margins: "0 5 0 0",
                layout:"border",
                autoScroll:false,
                items:  {
                      id:"mainFramePanel",
                      html:"",
                      frameborder:"0",
                      autoMask:false
                    }
              },
              {
                    region: "east",
                    id:"east-region",
                    collapsible: true,
                    collapseMode : "mini",
                    split: true,         // enable resizing
                    maxWidth: 500,
                    width: 320,
                    html:"xxx"
    
    
                  }]
          });
    
    
      });
    
    
    
    
    //]]>-->
    </script>
    </head>
    
    
    
    
    <body>
    </body>
    </html>

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Vote Rating
    1271
      0  

    Default

    The next release should have a fix to the document being ready if the code gets merged in.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Ext JS Premium Member
    Join Date
    Feb 2010
    Location
    Vancouver, BC
    Posts
    224
    Vote Rating
    1
      0  

    Default

    This IE9 specific bugs hasn't been fixed in Ext 4.1 beta 2.
    Sounds like native objects is not accessible if it is located within iframe only.

    With further investigation, we have noticed that above code renders content of iframe document twice. (so.. looks like you guys are rendering the html content twice) - test2.html

    If we downgrade to Ext 4.0.7, no error comes up

Posting Permissions

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