PDA

View Full Version : div tag



YankeeImperialistDog
6 Nov 2009, 2:15 PM
A simple one i think. I saw an example once where the extJS elements, forms, grids, ... were embeded into a div tag. I think this is common practicem, but i really have no idea how to do it. My extJS code is not in a seprate js file. It's just a simple form. Can someone show a simple 1,2,3 step process on how to do this?

Thanks
KES

brookd
6 Nov 2009, 3:55 PM
Look at some of the simple samples that ship with Ext. You need to use the renderTo property to render the element to an existing div.

For example a panel



var maypanel = new Ext.Panel({
title:'My Title',
width:400,
height:200,
renderTo:'myDivId'
})

YankeeImperialistDog
9 Nov 2009, 8:02 AM
i knew it was simple.
Appreciated!