PDA

View Full Version : Ext 2.2 IE Object Required Exception



phedoreanu
15 Aug 2008, 4:40 AM
Hi,


I have a weird javascript exception since I switched to Ext 2.2, but only on IE.


function createPanel() {
return new Ext.Panel({
id:'panel',
title:document.getElementById('panelTitle').value,
collapsible:false,
contentEl:'panelData',
renderTo:'panelContainer'
}); // the IE script debugger shows the exception at this line
}On FF works.

Help ? :D

devnull
15 Aug 2008, 7:35 AM
I dont see anything wrong with that bit of code so I wonder if you have an extra comma somewhere else. jslint.com is your friend here.

hendricd
15 Aug 2008, 7:42 AM
It's either the Ext.onReady problem (http://extjs.com/forum/showthread.php?t=43246)or you're not wrapping that in an Ext.onReady block

phedoreanu
18 Aug 2008, 4:35 AM
The function is defined in different js file (included above), than the one in which is called.

The calling of the function is wrapped in Ext.onReady() block


Ext.onReady(function() {
createPanel();
});
I've implemented the solution from the Ext.onReady problem (http://extjs.com/forum/showthread.php?t=43246) thread.


I still don't know what's wrong :(


edited:

Now the error only shows at the first calling of the function. After that no matter how many clicks I do, it works :-/

phedoreanu
18 Aug 2008, 11:33 PM
Finally got it working. It was an IE iFrame error.

The solution was indeed the post that hendricd suggested.


Thanks :D