-
27 Sep 2010 1:04 AM #1
IE7: 'null' is null or not an object
IE7: 'null' is null or not an object
Hi,
I have some very simple code: An autoload tab inside a tabpanel inside a window.
On IE7 it's throwing a 'null' is null or not an object error.
This seems to be a bug. The code works fine in Fx and Chrome.
I'm using Windows XP, IE7, ExtJS 3.2.0 to simulate this error.Code:Ext.onReady(function () { var myWindow = new Ext.Window({ id: "MyWindow", hidden: false, height: 550, width: 750, layout: "fit", items: new Ext.TabPanel({ id: "IBMTabPanel", activeTab: 0, items: [{ id: "IBMTab2", title: "IBM Tab", xtype: "panel", autoLoad: { url: "http://www.ibm.com" } }] }) }); });
-
27 Sep 2010 1:31 AM #2
You can't autoLoad from a different domain, it uses an Ajax request: https://developer.mozilla.org/En/Sam...for_JavaScript
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
27 Sep 2010 1:33 AM #3
The exception occurs even if I use the same domain. The www.ibm.com was only for demo purposes. Anyway, the XHR exception would be something totally else, like 'Access Denied'.
-
27 Sep 2010 1:39 AM #4
If I change the url to some local page it works fine for me. Follow the stack trace and see what's causing it.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
27 Sep 2010 2:08 AM #5
Ok, sorry, maybe I should have given more detail upfront, but I wanted to keep it simple.
I'm using Ext.NET v1, and the code I posted above was a reduced test case of the problem I'm experiencing.
I see only now that Ext.NET is overriding Panel so that you can load content in an iframe inside a Panel (e.g. it adds a isIFrame method).
It's when I use iframed content that I experience the problem. So I'm not sure whether the bug itself is in ExtJS or Ext.NET.
In any case, this is the part which bombs out in IE7:
The problem is that this.container == nullCode:// private layout : function(){ var ct = this.container, target = ct.getLayoutTarget(); if(!(this.hasLayout || Ext.isEmpty(this.targetCls))){ target.addClass(this.targetCls); } this.onLayout(ct, target); ct.fireEvent('afterlayout', ct, this); },
-
30 Sep 2010 5:34 AM #6
Similar Threads
-
[B]'null' is null or not an object IE7 / el is null in FireFox in ExtJS[/B]
By Jigesh Shah in forum Ext 1.x: Help & DiscussionReplies: 0Last Post: 20 May 2010, 4:54 PM -
'null' is null or not an object IE7 / el is null in FireFox in ExtJS
By Jigesh Shah in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 19 May 2010, 5:48 PM -
IE7 is killing me - Error: 'undefined' is null or not an object
By themattreid in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 11 Mar 2010, 12:24 PM -
IE7 problem ('this.container' is null or not an object)
By lucassus in forum Ext 1.x: Help & DiscussionReplies: 3Last Post: 10 Jul 2007, 2:45 PM


Reply With Quote