View Full Version : Opening new ext.js content from a URL in a window

1 Oct 2012, 8:05 AM
I'm trying to get a menu to open a modal window - with a simple maintenance screen - but I want to do it for lots of SQL tables..
Ideally then - I'd like to be able to dynamically load the html/ext.js stuff for the screens when the menu option is selected - rather than load all of the possible ones up when I load the page..

So - I've create a menu - with lots of items like :

{ text:'Person', iconCls: 'icon-Person', handler: function() {showMaintain('Person');} },

Then I have that 'showMaintain' function :

function showMaintain(s) {

var w = new Ext.Window({
autoLoad: {
url: 'maintain/'+s+'.html',
scripts: true
height: 300,
width: 600,

but - i cant seem to get the html file right that it loads..
For example do I need to re-include all the ext.js <script..> headers ?

I've tried something like :

<script type="text/javascript" src="maintain/helper.js"/>
<div id="WindowContents">

and then have 'helper.js' renderTo 'WindowContents' - but I dont get anything displayed...

Any help or pointers much appreciated!

10 Oct 2012, 8:14 AM
Why not return JSON and create components based on that?