PDA

View Full Version : Show external html in dialog



liammkelly
13 Jan 2011, 1:30 PM
I am instantiating an item outside of Ext (a molecular structure sketcher) and I want to display it in an Ext dialog when the user clicks on a link. I can access the item with Ext.get, but I don't know where to append it to.

The sketcher initializes itself in a simple div with id = 'editor'.

My dialog:



var structureWin = new Ext.Window({
title: 'Draw Structure',
closable:true,
width:650,
height:570,
plain:true,
layout: 'border',
modal:true,
id:'editorBox',
items: [
{
xtype:'panel',
region:'center',
border:false,
id:'editorWin'
}
]
});


But either Ext.get('editor').appendTo('editorBox') or Ext.get('editor').appendTo('editorWin') fail. I'm clearly missing something.. a little help?

Thanks!

Liam

fay
14 Jan 2011, 1:37 AM
Have you tried the Panel's (http://dev.sencha.com/deploy/dev/docs/?class=Ext.Panel) load() or update() methods?