PDA

View Full Version : Open a popup



kelglad
7 May 2012, 10:51 AM
I'm trying to open a popup on click of a button in IE and cannot get it to work. Can someone tell me what I'm doing wrong?

Ext.onReady(function(){

new Ext.Button({ text:'submit ExtJS',
handler: function() {
panel.show();
}
}).render(document.body, 'submit_button');

var panel = new Ext.Panel({
floating: true,
modal: true,
width: 300,
height: 400,
styleHtmlContent: true,
html: 'Hello! I\'m a PopUp',
dockedItems: [{
xtype: 'toolbar',
title: 'PopUp',
items: [{
xtype: 'spacer'
},{
text: 'Close',
handler: function(){
popup.hide();
}
}]
}]
});

panel.render(document.body);

}); //End onReady()

Tim Toady
7 May 2012, 11:51 AM
It sounds like what you want is a Window



Ext.create( 'Ext.window.Window', {
title: 'test',
height: 400,
width: 400
} ).show();


Unless you are looking for an alert which is also fairly simple.


Ext.Msg.alert( 'Hi', 'Blah' );