-
12 Apr 2009 8:48 PM #1
Update HTML content of panel added to a window
Update HTML content of panel added to a window
Hi,
I have a panel added to a window.I need to update the HTML content of the panel dynamically.I set the html content by
panel.html='HTML content';
panel.doLayout();
window.show();//the pane is one of the items of window
Now next time if i try to update the html content
panel.html='HTML content updated....';
panel.doLayout();
its not updated in the screen.Please note that the window is already open.
Thanks in advance
-
12 Apr 2009 11:38 PM #2
No need to layout, each Panel has 3 different Ext.Element's associated with it header, body and footer which you can manipulate.
Code:panel.body.update('HTML content updated...');Aaron Conran
@aconran
Sencha Architect Development Team
-
12 Apr 2009 11:47 PM #3
thks a lot
thks a lot
HI,
thanks a lot for replying.
I have one more doubt.
I have three grids added to a window.I want to collapse the grids programatically.
i tried grid1.collapsed=true;
but it does not reflect in the screen.How do i resolve this?
-
13 Apr 2009 12:04 AM #4
You are attempting to set private properties of the object.
After you have constructed your class you can no longer set properties like this, you must call the appropriate methods.
http://extjs.com/deploy/dev/docs/?cl...ember=collapseAaron Conran
@aconran
Sencha Architect Development Team
-
13 Apr 2009 12:12 AM #5
hi
hi
Hi,
thks for replyLast edited by sanjay_1985; 13 Apr 2009 at 12:14 AM. Reason: typo
-
4 Jun 2009 7:12 AM #6
Great advice why isn't it in the Beginners Tutorial?
Great advice why isn't it in the Beginners Tutorial?
Thank you Aaron! I'm glad someone else asked this question. But I'm puzzled this is basic stuff that is not obvious. Dynamically updating or programatically updating text content in an extjs panel is like probably the 2nd or 3rd thing most programmers coming to extjs will want to do. I know I certainly wanted to do that after I did the first "Hello World" type example with static content, my next question is ok how do I change that content from my program? and that was not obvious. Might I suggest someone at extjs move your very handy tip here to the Tutorial section?? Thanks... Ray
-
4 Jun 2009 7:30 AM #7
Ray -
The entire Learn section of our site is a community wiki which community members, like yourself are able to contribute to. Check it out http://extjs.com/learnAaron Conran
@aconran
Sencha Architect Development Team
-
2 Oct 2012 5:22 AM #8
How to get html content of a panel
How to get html content of a panel
Hi ,
This is Ranjithreddy, i am new to ExtJs.
I have been facing a problem in panels for getting panel html content.
xtype : 'panel',
id : 'first_block',
html : '<p>Hi this is belongs to first block.</p>',
listeners : {
render : function(c) {
c.body.on('click', function() {
alert('' + this.id);
alert(Ext.getCmp('first_block').items.getAt(0) .getValue());
});
}
I am not getting html content, but i am getting id like "first_block-body".
Could you please help me out.
Thanks in advance.


Reply With Quote