PDA

View Full Version : Extjs elements destroy/fly



siva565
25 Feb 2012, 3:19 AM
I'm loading dynamic pages into Html id using load() function. So i want to destroy/clear/fly all Elements(including javascript objects) which are loaded previously into the Html id After destroy the previous loaded elements then new content should be load in to Html id. I'm rendering Extjs form panels and popup in each pages.When i'm trying to load same page again popups are not displaying because previous elements not destroying. Whts the wrong with my approch.



var content_div = Ext.get(div_id);
content_div.load({
url:BASE_URL+url_href,
scripts:true,
text: 'Loading...',
params:{id:'123'}
});
content_div.show();


Any ideas?

mitchellsimoens
25 Feb 2012, 8:08 AM
So the new elements are just adding to the old ones?

siva565
25 Feb 2012, 8:16 AM
Yes Mitchell Simoens.. Do you have any know solutions for this issue?

mitchellsimoens
25 Feb 2012, 8:18 AM
content_div.update('');

before load should clear out the element.

siva565
25 Feb 2012, 8:21 AM
Thanks Mitchell Simoens. Let me check it once...

siva565
25 Feb 2012, 8:27 AM
Unfortunately it is not working..

siva565
25 Feb 2012, 8:34 AM
Actually my problem is i have an tree panel on the left side of tabpanel and when click treepanel node the center content will load.. In this i have some button which shows popups.. When i click on treepanel node first time all popup are working fine.When i clicked on another treepanel node the popups not showing. For better understanding my layout please check this thread.. http://www.sencha.com/forum/showthread.php?183050-Extjs4-treepanel-expand-upto-particular-level

pansiom
25 Feb 2012, 7:13 PM
Thanks Mitchell Simoens. Let me check it once...study