I have a panel in extjs-3.x. On a certain event(say click of a button), I am trying to unload the extjs-3.x js and css files. And replace them with extjs-4.x js and css files in my DOM. After this I need to render some components in extjs-4.x.
Basically, I want both extjs-3(panel in my case) and extjs-4 components to coexist together but I cannot use the sandbox due to some reasons.
The problem I am facing is that, even after unloading the extjs-3.x files, the firebug window shows the Ext version to be 3.x. And obviously I am not able to create extjs-4 components.
Am I missing out something here. Any pointers or any other way to achieve this would be of great aid. Thanks.
PS: I am using the snippet from here for unloading my js and css files.
http://www.javascriptkit.com/javatutors/loadjavascriptcss2.shtml
Apparently, unsetting the ‘Ext’ variable after unloading the extjs-3 files. And then loading the extjs-4 files using a callback function for creating extjs-4 components did the trick.
Thanks Lolo for the suggestion.