PDA

View Full Version : ExtJs error message (ct.dom.insertBefore) ?



chami
5 Jun 2010, 12:29 PM
Hi all,

following the ExtJs example here (http://www.extjs.com/deploy/dev/examples/layout/complex.html) i wrote the same View (windows) as described but when i try to display the result I have this error message from firebug



this.el is null
ct.dom.insertBefore(this.el.dom, position);
ext-all-debug.js (ligne 13284)

p.el is null
p.el.enableDisplayMode(); ext-all-debug.js (ligne 15622)




I have no idea about how to correct this error or what does it mean !

Thanks a lot for your help

wm003
5 Jun 2010, 12:42 PM
Something must be different to the original example. Please provide an Url to your not working page or at least some code to investigate.

chami
5 Jun 2010, 2:29 PM
Yes of course,

here is my js file (for building the interface)



Ext.BLANK_IMAGE_URL = '../libs/ext/resources/images/default/s.gif';

Ext.QuickTips.init();

var MainWindows = function() {

var viewPort;

return {
init : function() {

viewPort = new Ext.Viewport({
layout:'border',
items:[
new Ext.BoxComponent({
region:'north',
id:'NorthSection',
height:32,
autoEl:{
tag:'<div>',
html:'<p> North</p>'
}
}),{
region:'south',
id:'SouthSection',
contentEl:'south',
title:'South Section',
split:true,
height:100,
maxSize:200,
minSize:70,
collapsible:true,
margins: '0 0 0 0'
},{
region:'east',
id:'EastSection',
title:'East Section',
collapsible:true,
split:true,
width:225,
minSize:175,
maxSize:400,
margins:'0 5 0 0'
},{
region:'west',
id:'WestSection',
title:'West Section',
split:true,
width:200,
minSize:175,
maxSize:200,
collapsible:true,
margins:'0 0 0 5',
layout:{
type:'accordion',
animate:true
},
items:[
{
contentEl:'west',
id:'Accordion1',
title:'Accordion 1',
border:false,
html:'<p>Here we are in accordion 1</p>',
iconCls:'settings'
},{
id:'Accordion2',
title:'Accordion 2',
//html:'<p>Here we are in accordion 2</p>',
border:false,
iconCls:'nav'
},{
id:'Accordion3',
title:'Accordion 3',
html:'<p>Here we are in accordion 3</p>',
border:false,
iconCls:'nav'
}
]// end of accordion items
}, // end of regions

//Now creating the center region with the TabPanel
new Ext.TabPanel({
region:'center',
deferredRender:false,
id:'CenterSection',
activeTab:0,
items:[
{
contentEl:'center',
title:'closable Tab with index 0',
closable:false,
autoScroll:true
},{
contentEl:'center',
title:'closable Tab with index 1',
closable:true,
autoScroll:true
} // end tab items
] // end TabPabel items
}) // end of Ext.TabPanel function
] // end of viewport items
}); // end of Ext.ViewPort function
}
};
}();
Ext.EventManager.onDocumentReady(MainWindows.init, MainWindows, true);


Here and here is the index.html file



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">

<!-- ** CSS ** -->
<!-- base library -->
<link rel="stylesheet" type="text/css" href="../libs/ext/resources/css/ext-all.css" />

<!-- ** Javascript ** -->

<!-- ExtJS library: base/adapter -->
<script type="text/javascript" src="../libs/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../libs/ext/adapter/ext/ext-base-debug.js"></script>

<!-- ExtJS library: all widgets -->
<script type="text/javascript" src="../libs/ext/ext-all.js"></script>
<script type="text/javascript" src="../libs/ext/ext-all-debug.js"></script>

<!-- ExtJS Main Window: Construct main layout -->
<script type="text/javascript" src="js/MainWindows.js"></script>

<title></title>
</head>
<body style="overflow: hidden;">
</body>
</html>



Thanks a lot

Animal
5 Jun 2010, 11:56 PM
autoEl:{
tag:'<div>',
html:'<p> North</p>'
}

?

http://www.extjs.com/deploy/dev/docs/?class=Ext.DomHelper

Animal
5 Jun 2010, 11:57 PM
But also, it's a 30 second job to debug your code.

Set a break on that line, follow back through the call stack to see where the null/undefined value was introduced.

chami
6 Jun 2010, 1:51 AM
Thanks for help, I'am new in Javascript and ExtJs world so ...

I found that I have an error in tag because I added the '<>' I corrected the error to have



tag:'div'


but I have this error



Ext.util is undefined
chrome://firebug/content/blank.gifwindow.undefined=window.undefined;Ext=...window.attachEvent("onunload",a)}})();



arff (I just want to display a simple layout and i'am sticked since 3 days)

Thanks for help

Animal
6 Jun 2010, 2:14 AM
Check your include files. You should have ext-base-debug.js and ext-all-debug.js

If you have those FIRST, then you should not get errors like that.

chami
6 Jun 2010, 3:27 AM
Hi,

Thanks a lot for help, I changed the inlude files and correct the Ext.fly(ce).removeClass(['x-hidden', 'x-hide-display']); error i got after that.

the error was about the contentEl, do do not really understand the error but when i deleted the contentEl entry all work fine now

Again thanks a lot guys

gosmasdamien
15 Oct 2013, 5:26 AM
I got an error saying Unable to get value of the property 'removeClass': object is null -ext-all-debug.js

It works fine in FireFox.. but shows error in IE Line: 15976 in ext-all-debug.js

Please help me