PDA

View Full Version : parentNode is null or not an object



titzu
4 Mar 2010, 5:46 AM
Hi,
I have this error in IE (works fine in FF).
I have some tabs wich I load dynamically on every activation. When I first load the tab everything is fine but on reload I get this errror in IE.
parentNode is null or not an object - ext-all-debug.js line 5452

This is the code



Ext.getCmp('content').removeAll();
Ext.getCmp('content').add(contentPagesForm);
Ext.getCmp('content').doLayout();
If removeExt.getCmp('content').removeAll(); I dont get the error anymore but I get every element from contentPagesForm doubled , tripled etc depends on how many times I activate the tab.

Thanks in advance,
Titzu

Animal
4 Mar 2010, 5:53 AM
removeAll also destroys all the Components.

titzu
4 Mar 2010, 6:10 AM
I understand that removeAll() removes all components from this container. This is just what I want to do: to remove any components added previously and to add the new updated component

Animal
4 Mar 2010, 6:14 AM
It destroys them.

Mike Robinson
4 Mar 2010, 7:18 AM
Hmm... Titzu, removing something from the DOM and putting something else in its place is probably going to create quite a "visual bounce" on the screen display as it might redraw itself twice in as-many milliseconds. Yuck. Is there any way to accomplish what you want without doing that?

titzu
4 Mar 2010, 8:11 AM
I dont know... I have some tabs with forms inside and on save (submit) I change the tab. I want when I go back to that tab the information I just submited to be visible. This means to reload the tab. How can I do that without removing the old information (form) and recreating the new form?