Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proper technique to close an ExtJS tab

What is the proper way to close an ExtJS tab programmatically?

I need to make this work in IE6; although remove'ing the tab from the TabPanel works, I see an IE warning: This page contains secure and unsecure items... When I click the X on the tab, I do not see this warning. So, clearly something clever is happening when I click the X.

Note: the warning occurs when I use tabPanel.remove(aTab, true) and it does not occur when I use tabPanel.remove(aTab, false). So, the mixed content warning is displayed during the removal and subsequent destruction of the panel.

Does it make sense to simulate the click on a tab?

EDIT

IE is telling me I have mixed SSL content when I don't

like image 205
Upperstage Avatar asked Feb 08 '10 20:02

Upperstage


1 Answers

Are you removing the tab's element directly, or are you removing the tab component from its container? E.g.:

Ext.fly('tab-id').remove(); // Element API

vs.

myTabPanel.remove('tab-id'); // Panel API

Both should work OK in terms of nuking the tab markup, but removing the element directly may have undesirable consequences. If you are doing the latter (correct), then I'm not sure what the issue might be. I don't have IE 6 handy myself.

like image 188
Brian Moeskau Avatar answered Sep 24 '22 21:09

Brian Moeskau