1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    84
    Vote Rating
    0
    nofx is on a distinguished road

      0  

    Default get html from panel

    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 - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,395
    Vote Rating
    23
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      1  

    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.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    Owner at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    https://github.com/AndreaCammarata/TUX


Thread Participants: 1