PDA

View Full Version : ExtJs App working only in IE



tarora
23 Nov 2010, 2:42 PM
I have create an ExtJs app which has a Form and a Panel. Its working perfectly fine in IE but not in any other browser. Basiically no component is loaded and main div component does not contain anything when the page is loaded. Also I noticed in debug mode that application is failing to load components in ext-debug.js

Condor
24 Nov 2010, 1:37 AM
Do you get any javascript errors?

tarora
24 Nov 2010, 7:01 AM
Do you get any javascript errors?

Look at the screenshots attached...they are zipped. firefox.zip and ie.zip are just to explain how the screen is looking on both the browsers. fail.zip shows the line where the application just stops responding. this happens before the code in the onready method starts to execute.

Hope I'm able to explain this well.

Thanks for your quick response.

Animal
24 Nov 2010, 7:21 AM
Use ext-all-debug.js during development and testing.

tarora
24 Nov 2010, 7:59 AM
Thanks that worked.

But do you know of any way where we can replace the ext-all-debug.js with ext-all.js for production during build time or app run time

rbastic
24 Nov 2010, 8:40 AM
Thanks that worked.

But do you know of any way where we can replace the ext-all-debug.js with ext-all.js for production during build time or app run time

It will mostly depend on what your server-side environment is like. For instance, here I'm developing an application using Tomcat -- hence, JSP is my templating language. In my client-side code I can then do:


<%= MyApp.getJSLibs() %>

and then have a class named MyApp with a function 'getJSLibs' defined, which could look something like this:



public static String getJSLibs() {
if (productionMode) {
// return script tags for ext-all.js
} else {
// return script tags for ext-all-debug.js
}
}


Another technique could be to just have 'ext-all-debug.js' in place on both production and development environments... and have 'ext-all-debug.js' actually be a copy of ext-all.js on production. Obviously, that presents a "gotcha" to anyone unfamiliar with the system.

tarora
24 Nov 2010, 9:01 AM
I got it...Thanks again to all who replied. This helps