-
19 Apr 2007 5:22 AM #1
GridView 'findHeaderIndex' IE7 bug
GridView 'findHeaderIndex' IE7 bug
I added a toolbar to the header panel of a gridview, and after a button is clicked, I was receiving Ext.fly(...) is not an object errors within IE. I tracked it down and found where the problem was.
The GridView class should be changed from (GridView.js Line 401 in 1.0 release):
to:Code:findHeaderIndex : function(n){ var r = Ext.fly(n).findParent("td." + this.hdClass, 6); return r ? this.getCellIndex(r) : false; }, findHeaderCell : function(n){ var r = Ext.fly(n).findParent("td." + this.hdClass, 6); return r ? r : false; },
It looks like this check is already in place for findRowIndex, and possibly others. I think the problem is from an event returning a bad target in IE.Code:findHeaderIndex : function(n){ if(!n){ return false; } var r = Ext.fly(n).findParent("td." + this.hdClass, 6); return r ? this.getCellIndex(r) : false; }, findHeaderCell : function(n){ if(!n){ return false; } var r = Ext.fly(n).findParent("td." + this.hdClass, 6); return r ? r : false; },
Regards-
Mark
-
13 Jun 2007 5:58 AM #2
Bump... this still seems to be a problem in 1.1 B1, using ext-base.js
http://extjs.com/forum/showthread.php?p=38777Andy
-
31 Oct 2007 2:36 PM #3
Hey guys,
Bumping this one up, I'm having a similar issue and the proposed code above seems to work. Can you have a(nother?) look into this?
-
22 Jul 2009 5:27 AM #4
Ext.fly(...) is null or not an object
Ext.fly(...) is null or not an object
Hi All,
I am also getting the same javascript error with IE: Ext.fly(...) is null or not an object.
I am using below files in my application:
EditableItem.js
RangeMenu.js
GridFilters.js
Filters.js
StringFilter.js
DateFilter.js
ListFilter.js
NumericFilter.js
columnLock.js
BooleanFilter.js
Also, I have tried both fixes inside my javascript file, but it didn't work.
1.
and 2.Code:Ext.override(Ext.EventObjectImpl, { getTarget : function(selector, maxDepth, returnEl){ var targetElement; try { targetElement = selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : this.target; } catch(e) { targetElement = this.target; } return targetElement; } });
Someone, please suggest me other solution.Code:Ext.override(Ext.grid.GridView, { findHeaderIndex : function(n){ if(!n){ return false; } var r = Ext.fly(n).findParent("td." + this.hdClass, 6); return r ? this.getCellIndex(r) : false; }, findHeaderCell : function(n){ if(!n){ return false; } var r = Ext.fly(n).findParent("td." + this.hdClass, 6); return r ? r : false; } } );
Thanks,
navdimri


Reply With Quote