Issue with switching between extjs versions on unloading and reloading js/css files dynamically
-
30-04-2021 - |
Question
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
Solution 2
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.
OTHER TIPS
Check this example http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/sandbox/sandbox.html in this Ext3 and 4 both files library files are using. This may helpful.