PDA

View Full Version : IE7 Ext.onReady, and Ext.select



joe_winter
28 Jun 2007, 7:03 AM
I'm working on a page where if I add the following code:


var global_var;
Ext.onReady(function() {global_var = Ext.select('ul.star-rating a', document.body); });
global_var.elements contains the correct number of elements in Firefox, but just a small subset of those elements in IE7 (IE7 is only picking up the anchors within the first ul.star-rating).

I can't reproduce this on a simplified page, but the page I'm working on is valid XHTML. And, even more strangely, if I use FirebugLite in IE and run that select function after the page has loaded, I get the correct results.

Any suggestions for where to start debugging this?

Thanks,
Joe

tryanDLS
28 Jun 2007, 7:21 AM
What version of the code and which adapter? Does it also happen in IE6?

joe_winter
28 Jun 2007, 7:25 AM
Ext1.1 Beta 1 and the behavior was the same with the ext-base adapter and the prototype adapter.

joe_winter
28 Jun 2007, 11:28 AM
Ugh. I figured it out. It was this IE problem:
http://dev.jquery.com/ticket/919

SWFObject was writing out innerHTML and triggering the dom ready state in IE 6 & 7. Here's the relevant code from SWFObject:

if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
n.innerHTML = this.getSWFHTML();
return true;
}

swatikshah
17 Aug 2011, 1:36 AM
I have similar type of problem:

My below code works fine in FF and IE8. Where it goes into the ins.each loop. But for IE7 it does not do so.

var ins = bookmarkRow.select("*.EndecaBookmarkField[disabled=disabled]");
ins.each(function(e,c,idx){
e.dom.removeAttribute("disabled");
e.removeClass("hidden");
});

Can any one help.