PDA

View Full Version : [SOLVED] BorderLayout can't add ContentPanel



catacaustic
21 Aug 2007, 6:48 PM
I've got a BorderLayout set and I can't make it add a ContentPanel to any of the regions. If I comment out the lines that add the content panels, then it is fine, just doesn't show anything which isn't much use. When I try to add the ContentPanel's to the layout, I keep on getting errors.

JS:
var footprintPanel = new Ext.ContentPanel ("footprintPanel", {
title: "Footprinting",
background: false
});
var neutralisePanel = new Ext.ContentPanel ("neutralisePanel", {
title: "Neutralise",
background: true
});

var centralLayout = new Ext.BorderLayout ("centralLayout", {
west: {
initialSize: 200
},
center: {}
});

centralLayout.beginUpdate ();

centralLayout.add ("center", footprintPanel);
centralLayout.add ("center", neutralisePanel);

centralLayout.endUpdate ();HTML:
<div id="centralLayout">
<div id=">footprintPanel">Footprinting...</div>
<div id=">neutralisePanel">Neutralise...</div>
</div>The error that I'm getting in FireBug is "this.el has no properties". I've seen this happen when I get the wrong ID for a DOM element, but from what I can tell, it's all there, and I can't figure out where I'm going wrong.

BernardChhun
21 Aug 2007, 6:59 PM
did you copy and paste the HTML part?

the way it looks now...

<div id="centralLayout">
<div id=">footprintPanel">Footprinting...</div>
<div id=">neutralisePanel">Neutralise...</div>
</div>what it should look like:

<div id="centralLayout">
<div id="footprintPanel">Footprinting...</div>
<div id="neutralisePanel">Neutralise...</div>
</div>

catacaustic
21 Aug 2007, 7:05 PM
Bernard, thank you! I hate trying to look over my own code for something that's that much of a silly mistake. It's amazing... once I fixed that, it worked. I think I should give up and go back to bed.

BernardChhun
21 Aug 2007, 7:10 PM
Bernard, thank you! I hate trying to look over my own code for something that's that much of a silly mistake. It's amazing... once I fixed that, it worked. I think I should give up and go back to bed.

:)) good night!