PDA

View Full Version : [Solved] IE 7 problem with grid



cgriffin
15 Feb 2008, 1:05 PM
My site is setup so that most of the common stuff is loaded once in the head of the document (Ext, Prototype, Scriptaculous, etc.). I load different content into the dom with Ajax.Updater.
I have a grid that used Ajax to load the data. The first time I load it, it works fine. But if I go to another page then back I get an Object required. I have traced it to the El.mask function. It is failing when it executes this line:

mm.dom.firstChild.innerHTML = msg;

on line 3366 in Ext 1.1.1 ext-all-debug.js

Any ideas? Or any suggestions on how I can get more information about the problem so as to get a better clue what is happening? I have Microsoft Script Editor, Microsoft Script Debugger, and Visual Studio to debug with. Thanks in advance for any help.

Chris

fay
15 Feb 2008, 1:26 PM
Are you re-creating the grid each time the page loads? Might be something in there, but it's hard to say without seeing some code.


Any ideas? Or any suggestions on how I can get more information about the problem so as to get a better clue what is happening? I have Microsoft Script Editor, Microsoft Script Debugger, and Visual Studio to debug with.

For debugging, I can't recommend enough that you use FireFox and FireBug (www.getfirebug.com) - no comparison with debugging IE. If you are stuck with IE, try DebugBar and IE DOM Explorer.

cgriffin
15 Feb 2008, 1:40 PM
Yea I'm stuck in IE since of course it works fine if FireFox/Safari. :D

Thanks I wasn't aware of debugbar. I am reloading the grid definition code each time. I'm also doing the Ajax call each time to retrieve the data.

One more piece of data is that the call to mask is for the "loading" notice that comes up while the Ajax call is running.

yogeshmsharma
15 Feb 2008, 10:15 PM
I am also facing same problem with grid in IE 6.
Example code just runs fine but code by me doesn't work.

fay
16 Feb 2008, 1:08 AM
Without seeing some code it's impossible to guess what's going wrong.

cgriffin
18 Feb 2008, 5:46 PM
For some reason when use the dom to dynamically load a grid the DIV for the actually grid is not getting removed, but seem to get corrupted. So for a quick fix I changed one line in ext-all-debug.js. I forced it to rebuild the loading mask every time my setting this.removeMask to true.



Ext.LoadMask = function(el, config){
this.el = Ext.get(el);
Ext.apply(this, config);
if(this.store){
this.store.on('beforeload', this.onBeforeLoad, this);
this.store.on('load', this.onLoad, this);
this.store.on('loadexception', this.onLoad, this);
this.removeMask = true; <---------------------------- change this from false to true
}else{
var um = this.el.getUpdateManager();
um.showLoadIndicator = false; um.on('beforeupdate', this.onBeforeLoad, this);
um.on('update', this.onLoad, this);
um.on('failure', this.onLoad, this);
this.removeMask = true;
}
};