1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    2
    Answers
    1
    Vote Rating
    0
    nozer is on a distinguished road

      0  

    Question Answered: A problem was happened in Ext4 about iframe element. Who can help me?

    Answered: A problem was happened in Ext4 about iframe element. Who can help me?


    I want show a page in the Ext.window use iframe.

    It's my code:
    Code:
    var window = Ext.create('Ext.window.Window', {
        title: '供求详情', 
        autoScroll: true, 
        layout: 'fit', 
        modal: true, 
        frame: true, 
        frameHeader: true, 
        html: '<iframe src="http://www.jiezanke.com/Supply/SupplyDetail.html"></iframe>' 
    }).show();
    When I test the window,I can't see the iframe element.This element(iframe) seems to have been filtered out.What do I do? In ext4.My English sucks,everybody sorry.
    Last edited by skirtle; 6 Dec 2011 at 2:38 AM. Reason: Added CODE tags

  2. Thanks tobiu,

    I was change my code:
    HTML Code:
    var window = Ext.create('Ext.window.Window', {
                title: '供求详情',
                autoScroll: true,
                layout: 'fit',
                modal: true,
                items:[{
                    xtype: 'component',
                    autoEl: {
                        tag: 'iframe',
                        src: 'http://www.jiezanke.com/Supply/SupplyDetail.html'
                    }
                            }]
            }).show();
    But firebug tips me:"Uncaught TypeError: Cannot call method 'addCls' of null"

  3. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,679
    Answers
    130
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    i would use the items config instead of html and add an iframe with the autoEl:
    http://docs.sencha.com/ext-js/4-0/#!...ent-cfg-autoEl

    if you prefer the html, i would inspect the dom with the debugging tools, probably the iframe just needs height and width set to 100%.
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  4. #3
    Sencha User
    Join Date
    Jan 2011
    Posts
    2
    Answers
    1
    Vote Rating
    0
    nozer is on a distinguished road

      0  

    Question


    Thanks tobiu,

    I was change my code:
    HTML Code:
    var window = Ext.create('Ext.window.Window', {
                title: '供求详情',
                autoScroll: true,
                layout: 'fit',
                modal: true,
                items:[{
                    xtype: 'component',
                    autoEl: {
                        tag: 'iframe',
                        src: 'http://www.jiezanke.com/Supply/SupplyDetail.html'
                    }
                            }]
            }).show();
    But firebug tips me:"Uncaught TypeError: Cannot call method 'addCls' of null"

Thread Participants: 1

Tags for this Thread