Bug info:
Ext version 1.1 w/ext-base.js
XP
IE 7.0.5730.11
I'm getting a runtime error on this line in ext-all.js:
Ln224:
this.titleTextEl.innerHTML=(typeof _19!="undefined"&&_19.length>0?_19:" ");
The JS that calls this is during when I'm building my BorderLayout and the first time I add a ContentPanel that has a title:
mainLayout.add('center', new Ext.ContentPanel('form-div', {
fitToFrame: true, title: 'Form', autoScroll: true
}));
This works fine in FF, only blows up in IE7.
thx, I'll give that a shot.
To answer your question:
Yes, I build my BorderLayout inside of an init : function which is called inside Ext.EventManager.onDocumentReady
Also, I can debug the JS in VS2005 at the error breakpoint and inspect the properties of the JS objects and all seem be valid. My title is being passed into that func properly.
I'd bet this is not bug in Ext as Complex Layout Example uses same code as your app and it runs w/o any problem.
I'd look what's difference between the example and your app.
8887
modified OP
What is titleTextEl pointing at - is it a valid dom element?
using ext-all-debug.js produced the same error.
here is the JS callstack by linenumber:
ln:25408this.titleTextEl.innerHTML = (typeof title != "undefined" && title.length > 0 ? title : " ");
ln:25425this.updateTitle(panel.getTitle());
ln:25482this.setActivePanel(panel);
ln:24758return this.regions[target].add(panel);
mycode:mainLayout.add('center', new Ext.ContentPanel('form-div', {
fitToFrame: true, title: 'Form', autoScroll: true
}));
this is the whole func the error is caught in:
updateTitle : function(title){
if(this.titleTextEl && !this.config.title){
this.titleTextEl.innerHTML = (typeof title != "undefined" && title.length > 0 ? title : " ");
}
},
on the line in question, the check for title.length > 0, isn't that normally a check for an array object?
the title param that is coming in is of type string, perhaps that is causing the error?
noob question obviously.
the reason I ask is because title.length is returning 0 when the value of title='Form'
I've attached a screenshot of my debugging window along with some calls into the JS to show you the current state.
The attempt to set the innerHTML is what is causing the runtime error.
(I tried setting innerText and that worked fine)
This is all I could find via google about the possible cause of this:
http://piecesofrakesh.blogspot.com/2007/02/ies-unknown-runtime-error-when-using.html
Use ext-all-debug.js and step thru that code. Is the element valid? Is your code within an onReady function? You can get errors in IE if the document is not fully loaded before you start accessing it.
SOLVED:
The div that I was loading into the ContentPanel had a malformed div tag (no closing tag, was closed via single tag slash)
I switched this to use closing tag and voila.
Allergies.. no relief?!?
Religion in the workplace? |