Results 1 to 3 of 3

Thread: Adding an iframe with html to a panel doesn't work

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Location
    France
    Posts
    159
    Answers
    2

    Default Adding an iframe with html to a panel doesn't work

    Hi,

    That doesn't display anything:

    PHP Code:
    '#gridNews': {
      
    itemclick: function (itemrecord) {
        var 
    prev Ext.ComponentQuery.query('#previewNews')[0];

        
    prev.html '<iframe src="' record.get('new_url') + '", height="100%", width="100%">';
      }
    }, 

  2. #2
    Sencha User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Answers
    106

    Default

    Try using Ext.DomHelper to append the iframe to the panel's body Element.

  3. #3
    Sencha User harman's Avatar
    Join Date
    Jul 2011
    Location
    India
    Posts
    138
    Answers
    2

    Default Use DOM

    See if this works

    Code:
    newIFrame=document.createElement('iframe');
    document.body.appendChild(newIFrame);
    This will add an iframe to your window but if you want to add it to ExtJS panel
    i guess you need to get to the panel object to use add method.

Posting Permissions

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