1. #1
    Ext JS Premium Member
    Join Date
    Feb 2010
    Location
    Vancouver, BC
    Posts
    195
    Vote Rating
    0
    rkim is on a distinguished road

      0  

    Default ext codes error within iframe

    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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,541
    Vote Rating
    872
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The next release should have a fix to the document being ready if the code gets merged in.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member
    Join Date
    Feb 2010
    Location
    Vancouver, BC
    Posts
    195
    Vote Rating
    0
    rkim is on a distinguished road

      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

Thread Participants: 1