View Full Version : My MVC App not running in IE8.

25 Jul 2012, 1:35 AM
I have developed an MVC App for my project using Eclipse IDE. Am able to run it Firefox, Safari and Chrome but not in IE.
It is a very big application and consists of many Ext Js features like panels,grids,charts,forms etc..,
Please note that there are no syntax errors like extra commas etc.., in the code developed...

PLEASE HELP ME on this....it is of high importance for me...and am not able to figure out what went wrong...(:|

Error in IE is the one pasted below...

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2; .NET4.0E)
Timestamp: Wed, 25 Jul 2012 09:31:36 UTC

Message: 'undefined' is null or not an object
Line: 121
Char: 9
Code: 0
URI: http://localhost:8080/MyAppName/extjs/src/data/Field.js?_dc=1343208681832

Message: 'undefined' is null or not an object
Line: 121
Char: 9
Code: 0
URI: http://localhost:8080/MyAppName/extjs/src/data/Field.js?_dc=1343208681832

Many Thanks in Advance...

25 Jul 2012, 11:19 AM
a class isn't loaded that is trying to be created.

25 Jul 2012, 11:51 AM
One thing to look out for with IE 8 is any stray commas.

Here's an example of a comma that caused IE to crash in a model of mine:

fields: [
name: 'objectId',
type: 'int'
name: 'title',
type: 'string'
}, <-- this comma should not be here

26 Jul 2012, 1:20 AM
Hi fordprefect,

yeah i have already taken care of that kind of trailing commas in my code. There are no such errors in my code...is there anything else that i could try with...
the error is shown in an extjs related source file.

which version of extjs would be a better option for making it work in IE8...?
currently am using extjs4.1. Please help

26 Jul 2012, 4:49 AM
I've run into this same problem before and here's how I cured it:

In the code for your main application layout, comment out every child component you can, then run the app and see if it works.
If that worked, uncomment a single child component and retest.
Keep uncommenting child components, one at a time, and retesting until you hit the class that's problematic.
If the problematic class is a larger parent container with lots of children, then go through the same process with it.

Yes, this is a bit tedious, but it will fairly quickly narrow down the problem...

Also, don't forget about IE's Develper Tools (hit the F12 key). They're not quite as good as Firebug or Chrome's, but they can help.

26 Jul 2012, 5:43 AM
Yeah friend....
it is a tedious job...will take it as a worst case solution...
but i have one more doubt....which extjs related source files should i include in my MVC app....???
currently am using "resources" folder, "src" folder and ext.js file in my application...

26 Jul 2012, 8:51 AM
I feel your pain. I wrote a fairly large app and only tested during development on Firefox w/Firebug. When I finally got around to cross-browser testing, all browsers worked fine, except for IE where it just threw up a big, white, blank page with no script errors and no stack trace to follow. Most of my problems had to with nested custom components and my lack of Ext.require() statements at each component level.

Regardless, the only way I figured out the problem was by doing the comment/test/uncomment thing...

As for what files to include with your app, the production index.html page should look like below. Note that you only need include the CSS file, the base ext.js file and a combined/minified app-all.js file as created by the Sencha SDK Tools (http://www.sencha.com/products/sdk-tools/):

<title>Hello Ext</title>

<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
<script type="text/javascript" src="extjs/ext.js"></script>
<script type="text/javascript" src="app-all.js"></script>

See the section 3. Deployment of the Getting Started (http://docs.sencha.com/ext-js/4-1/#!/guide/getting_started) guide for details.

30 Jul 2012, 12:44 AM
Yeah...i got it running in IE... :)
the problem was a trailing comma only in a different case where my eclipse IDE was not able to show it as an error...

extend : "Ext.data.Model",
fields : [
{name : "name" type : "string"},
{name : "email" type : "string"}, // This kind of comma caused the problem

Many thanks to everyone who replied me :)