PDA

View Full Version : Embed container in existing page at div



thomasmckay
21 Feb 2011, 1:03 PM
In an existing webpage there is a div w/ id=main-body. Using Ext Designer I've created a Panel with several sub panels and forms. Using the auto-generated xds_index.js as a model, I've tried replacing the renderTo: Ext.getBody() with various combinations of renderTo and applyTo to Ext.Element.get("main-body"). Some of the content goes within this div but much of it ends up being rendered outside of this div (after the content or positioned top left).

What is the proper container to use and/or methodology to embed content into an existing div?

thomasmckay
22 Feb 2011, 11:50 AM
Any suggestions? Is this a supported way to use ExtJS? Examples of inserting a panel at a div?

drian
22 Feb 2011, 10:21 PM
renderTo: 'main-body' ?

Condor
23 Feb 2011, 5:54 AM
Indeed.

If you also want the component to stretch to fill the 'main-body' then I recommend using the FitToParent plugin from the User Extensions forum.

Condor
23 Feb 2011, 5:54 AM
Indeed.

If you also want the component to stretch to fill the 'main-body' then I recommend using the FitToParent plugin from the User Extensions forum.