PDA

View Full Version : how to create Ext.window in other html



kramal
21 Feb 2013, 5:03 AM
Hello Friends !

I have very small apps which works in following order. 1) When I select '?order=11' on combobox and 2) click on button 'HELLO', it is created new window(or tab ). And in new window I want to create Ext.Window. I do it for simple DOM element div ,but I cant create Ext.Window in new window. How to do it?

Thanks!

Here is code:



Ext.onReady(function(){
Ext.create('Ext.form.field.ComboBox',{
fieldLabel:'Site',
renderTo:Ext.getBody(),
id:'combo',
store:[
'?retro=09','?something=5','?order=11'
]
});
Ext.create('Ext.Button',{
text:'HELLO',
renderTo:Ext.getBody(),
handler:function(c_url, n_url){
var site=Ext.getCmp('combo').getValue();
n_url=site;
c_url=location.href;

var newWin = window.open (n_url, "new" );
newWin=Ext.dom.Element(newWin);
window.open (c_url+"#maintain_focus","_self");
newWin.focus();


//newWin.createChild({tag: 'script', html: 'Form 1 - Very Simple'});

var script = newWin.document.createElement('div');
script.innerHTML = "uuuu";
var body = newWin.document.body;
body.insertBefore(script, body.firstChild);





}
})
});

scottmartin
21 Feb 2013, 9:04 AM
Window in another window:
http://docs.sencha.com/ext-js/4-1/#!/example/window/window.html

Scott.