View Full Version : MessageBox show function not working ?

13 Aug 2012, 12:42 AM
Show function of MessageBox not working ?

var msg = Ext.create('Ext.window.MessageBox', { width: 300,
height: 200,
title: 'Choose Option'

Thanks in advance.

13 Aug 2012, 2:35 AM
you should use messageBox like defined in below code:

title:'Save Changes?',
msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
buttons: Ext.Msg.YESNOCANCEL,
icon: Ext.Msg.QUESTION

For more info, you can refer to the following link:

13 Aug 2012, 4:22 AM
If i want to include items like radio, checkbox in the messagebox then how can i do it in the singleton instance of the messagebox ?

13 Aug 2012, 4:44 AM
Ext.window.MessagBox (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.window.MessageBox) is a relatively simple utility class. For more complex user interaction, consider coding your own Ext.window.Window (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.window.Window) with an embedded Ext.panel.Form (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.form.Panel) and appropriate form fields.

13 Aug 2012, 8:40 PM
Thanks for your response.
In sencha touch Ext.MessagBox is working correctly but extjs it is not working.
I explored source code of the show function I found that it needs configs of the this class.
So when i write this

it is working but when i am inserting some items into the messagebox it is not coming on the screen.
We can do it in window. But we will not get look and feel of the messagebox.:(

Thanks in advance.