Results 1 to 2 of 2

Thread: get html from panel

  1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    84

    Default get html from panel

    Hi, is there a way to get the html from a panel?? Something like:

    Ext.getCmp('my-panel').getHtml();

  2. #2
    Sencha User
    Join Date
    Jun 2009
    Location
    Italy
    Posts
    1,395

    Default

    Hi nofx.
    Actually there's no function that allow you to get the panel html, because the html property is removed from the component after it is rendered.
    However, I write you an example that show you how to get it

    Code:
    Ext.setup({
        onReady: function() {
    
    
    		var pnl = new Ext.Panel({
    			fullscreen: true,
    			html: '<p>This is the html content</p>'
    		});
    		
    
    
    		alert(pnl.body.dom.innerHTML);
    
    
        }
    });
    Hope this helps.

Posting Permissions

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