-<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.MessageBox-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.MessageBox-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.MessageBox-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="bookmark" href="../docs/?class=Ext.MessageBox"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div><h1>Class <a href="source/MessageBox.html#cls-Ext.MessageBox">Ext.MessageBox</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">MessageBox.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/MessageBox.html#cls-Ext.MessageBox">MessageBox</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description"><p>Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.<p/>
+<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.MessageBox-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.MessageBox-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.MessageBox-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="bookmark" href="../docs/?class=Ext.MessageBox"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div><h1>Class <a href="source/MessageBox.html#cls-Ext.MessageBox">Ext.MessageBox</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/MessageBox.html#cls-Ext.MessageBox">MessageBox.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/MessageBox.html#cls-Ext.MessageBox">MessageBox</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description"><p>Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.<p/>
<p>Note that the MessageBox is asynchronous. Unlike a regular JavaScript <code>alert</code> (which will halt
browser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have code
that should only run <em>after</em> some user feedback from the MessageBox, you must use a callback function
<p>Note that the MessageBox is asynchronous. Unlike a regular JavaScript <code>alert</code> (which will halt
browser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have code
that should only run <em>after</em> some user feedback from the MessageBox, you must use a callback function
Supported ...</div><div class="long">An object containing the default button text strings that can be overriden for localized language support.
Supported properties are: ok, cancel, yes and no. Generally you should include a locale-specific
resource file for handling language support across the framework.
Supported ...</div><div class="long">An object containing the default button text strings that can be overriden for localized language support.
Supported properties are: ok, cancel, yes and no. Generally you should include a locale-specific
resource file for handling language support across the framework.
-Customize the default text like so: Ext.MessageBox.buttonText.yes = 'oui'; //french</div></div></td><td class="msource">MessageBox</td></tr><tr class="property-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-defaultTextHeight"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-defaultTextHeight">defaultTextHeight</a></b> : Number<div class="mdesc">The default height in pixels of the message box's multiline textarea if displayed (defaults to 75)</div></td><td class="msource">MessageBox</td></tr><tr class="property-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-maxWidth"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-maxWidth">maxWidth</a></b> : Number<div class="mdesc">The maximum width in pixels of the message box (defaults to 600)</div></td><td class="msource">MessageBox</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-minProgressWidth"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-minProgressWidth">minProgressWidth</a></b> : Number<div class="mdesc"><div class="short">The minimum width in pixels of the message box if it is a progress-style dialog. This is useful
+Customize the default text like so: Ext.MessageBox.buttonText.yes = "oui"; //french</div></div></td><td class="msource">MessageBox</td></tr><tr class="property-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-defaultTextHeight"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-defaultTextHeight">defaultTextHeight</a></b> : Number<div class="mdesc">The default height in pixels of the message box's multiline textarea if displayed (defaults to 75)</div></td><td class="msource">MessageBox</td></tr><tr class="property-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-maxWidth"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-maxWidth">maxWidth</a></b> : Number<div class="mdesc">The maximum width in pixels of the message box (defaults to 600)</div></td><td class="msource">MessageBox</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-minProgressWidth"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-minProgressWidth">minProgressWidth</a></b> : Number<div class="mdesc"><div class="short">The minimum width in pixels of the message box if it is a progress-style dialog. This is useful
-for setting a different minimum width than text-only dialogs may need (defaults to 250)</div></div></td><td class="msource">MessageBox</td></tr><tr class="property-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-minWidth"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-minWidth">minWidth</a></b> : Number<div class="mdesc">The minimum width in pixels of the message box (defaults to 110)</div></td><td class="msource">MessageBox</td></tr></tbody></table><a id="Ext.MessageBox-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-alert"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-alert">alert</a></b>( <code>String title</code>, <code>String msg</code>, <span title="Optional" class="optional">[<code>Function fn</code>]</span>, <span title="Optional" class="optional">[<code>Object scope</code>]</span> )
+for setting a different minimum width than text-only dialogs may need (defaults to 250).</div></div></td><td class="msource">MessageBox</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-minPromptWidth"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-minPromptWidth">minPromptWidth</a></b> : Number<div class="mdesc"><div class="short">The minimum width in pixels of the message box if it is a prompt dialog. This is useful
+for setting a different mini...</div><div class="long">The minimum width in pixels of the message box if it is a prompt dialog. This is useful
+for setting a different minimum width than text-only dialogs may need (defaults to 250).</div></div></td><td class="msource">MessageBox</td></tr><tr class="property-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-minWidth"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-minWidth">minWidth</a></b> : Number<div class="mdesc">The minimum width in pixels of the message box (defaults to 100)</div></td><td class="msource">MessageBox</td></tr></tbody></table><a id="Ext.MessageBox-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-alert"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-alert">alert</a></b>( <code>String title</code>, <code>String msg</code>, <span title="Optional" class="optional">[<code>Function fn</code>]</span>, <span title="Optional" class="optional">[<code>Object scope</code>]</span> )
:
Ext.MessageBox<div class="mdesc"><div class="short">Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).
If a c...</div><div class="long">Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).
If a callback function is passed it will be called after the user clicks the button, and the
id of the button that was clicked will be passed as the only parameter to the callback
:
Ext.MessageBox<div class="mdesc"><div class="short">Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).
If a c...</div><div class="long">Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).
If a callback function is passed it will be called after the user clicks the button, and the
id of the button that was clicked will be passed as the only parameter to the callback
-(could also be the top-right close button).<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the callback function</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-confirm"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-confirm">confirm</a></b>( <code>String title</code>, <code>String msg</code>, <span title="Optional" class="optional">[<code>Function fn</code>]</span>, <span title="Optional" class="optional">[<code>Object scope</code>]</span> )
+(could also be the top-right close button).<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code>this</code> reference) in which the callback is executed. Defaults to the browser wnidow.</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-confirm"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-confirm">confirm</a></b>( <code>String title</code>, <code>String msg</code>, <span title="Optional" class="optional">[<code>Function fn</code>]</span>, <span title="Optional" class="optional">[<code>Object scope</code>]</span> )
:
Ext.MessageBox<div class="mdesc"><div class="short">Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).
If a callback funct...</div><div class="long">Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).
If a callback function is passed it will be called after the user clicks either button,
and the id of the button that was clicked will be passed as the only parameter to the callback
:
Ext.MessageBox<div class="mdesc"><div class="short">Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).
If a callback funct...</div><div class="long">Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).
If a callback function is passed it will be called after the user clicks either button,
and the id of the button that was clicked will be passed as the only parameter to the callback
-(could also be the top-right close button).<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the callback function</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-getDialog"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-getDialog">getDialog</a></b>()
+(could also be the top-right close button).<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code>this</code> reference) in which the callback is executed. Defaults to the browser wnidow.</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-getDialog"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-getDialog">getDialog</a></b>()
:
Ext.Window<div class="mdesc"><div class="short">Returns a reference to the underlying Ext.Window element</div><div class="long">Returns a reference to the underlying <a href="output/Ext.Window.html" ext:cls="Ext.Window">Ext.Window</a> element<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Ext.Window</code><div class="sub-desc">The window</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-hide"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-hide">hide</a></b>()
:
:
Ext.Window<div class="mdesc"><div class="short">Returns a reference to the underlying Ext.Window element</div><div class="long">Returns a reference to the underlying <a href="output/Ext.Window.html" ext:cls="Ext.Window">Ext.Window</a> element<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Ext.Window</code><div class="sub-desc">The window</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-hide"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-hide">hide</a></b>()
:
Ext.MessageBox<div class="mdesc"><div class="short">Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's p...</div><div class="long">Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt).
The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user
clicks either button, and the id of the button that was clicked (could also be the top-right
Ext.MessageBox<div class="mdesc"><div class="short">Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's p...</div><div class="long">Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt).
The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user
clicks either button, and the id of the button that was clicked (could also be the top-right
-close button) and the text that was entered will be passed as the two parameters to the callback.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the callback function</div></li><li><code>multiline</code> : Boolean/Number<div class="sub-desc">(optional) True to create a multiline textbox using the defaultTextHeight
+close button) and the text that was entered will be passed as the two parameters to the callback.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code>this</code> reference) in which the callback is executed. Defaults to the browser wnidow.</div></li><li><code>multiline</code> : Boolean/Number<div class="sub-desc">(optional) True to create a multiline textbox using the defaultTextHeight
property, or the height in pixels to create the textbox (defaults to false / single-line)</div></li><li><code>value</code> : String<div class="sub-desc">(optional) Default value of the text input element (defaults to '')</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-setIcon"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-setIcon">setIcon</a></b>( <code>String icon</code> )
:
Ext.MessageBox<div class="mdesc"><div class="short">Adds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for default
styling, and the c...</div><div class="long">Adds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for default
styling, and the class passed in is expected to supply the background image url. Pass in empty string ('')
property, or the height in pixels to create the textbox (defaults to false / single-line)</div></li><li><code>value</code> : String<div class="sub-desc">(optional) Default value of the text input element (defaults to '')</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.MessageBox-setIcon"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-setIcon">setIcon</a></b>( <code>String icon</code> )
:
Ext.MessageBox<div class="mdesc"><div class="short">Adds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for default
styling, and the c...</div><div class="long">Adds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for default
styling, and the class passed in is expected to supply the background image url. Pass in empty string ('')
-to clear any existing icon. The following built-in icon classes are supported, but you can also pass
-in a custom class name:
+to clear any existing icon. This method must be called before the MessageBox is shown.
+The following built-in icon classes are supported, but you can also pass in a custom class name:
progress and wait dialogs will ignore this property and always hide the close button as they can only
be closed programmatically.</div></li>
<li><b>cls</b> : String<div class="sub-desc">A custom CSS class to apply to the message box's container element</div></li>
progress and wait dialogs will ignore this property and always hide the close button as they can only
be closed programmatically.</div></li>
<li><b>cls</b> : String<div class="sub-desc">A custom CSS class to apply to the message box's container element</div></li>
<li><b>fn</b> : Function<div class="sub-desc">A callback function which is called when the dialog is dismissed either
by clicking on the configured buttons, or on the dialog close button, or by pressing
the return button to enter input.
<li><b>fn</b> : Function<div class="sub-desc">A callback function which is called when the dialog is dismissed either
by clicking on the configured buttons, or on the dialog close button, or by pressing
the return button to enter input.
displayed (defaults to true)</div></li>
<li><b>msg</b> : String<div class="sub-desc">A string that will replace the existing message box body text (defaults to the
XHTML-compliant non-breaking space character '&#160;')</div></li>
displayed (defaults to true)</div></li>
<li><b>msg</b> : String<div class="sub-desc">A string that will replace the existing message box body text (defaults to the
XHTML-compliant non-breaking space character '&#160;')</div></li>
-<li><a id="show-option-multiline"></a><b>multiline</b> : Boolean/Number<div class="sub-desc">
-If <code>prompt</code> is true, instead of prompting the user with a single line textbox,
-specify <code>multiline = true</code> to prompt the user with a multiline textarea
-using the <code><a href="output/Ext.MessageBox.html#Ext.MessageBox-defaultTextHeight" ext:member="defaultTextHeight" ext:cls="Ext.MessageBox">defaultTextHeight</a></code> property, or specify a height in pixels
-to create the textarea (defaults to false creating a single-line textbox)</div></li>
+<li><a id="show-option-multiline"></a><b>multiline</b> : Boolean<div class="sub-desc">
+True to prompt the user to enter multi-line text (defaults to false)</div></li>
<li><b>progress</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>
<li><b>progressText</b> : String<div class="sub-desc">The text to display inside the progress bar if progress = true (defaults to '')</div></li>
<li><b>progress</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>
<li><b>progressText</b> : String<div class="sub-desc">The text to display inside the progress bar if progress = true (defaults to '')</div></li>
<li><b>proxyDrag</b> : Boolean<div class="sub-desc">True to display a lightweight proxy while dragging (defaults to false)</div></li>
<li><b>title</b> : String<div class="sub-desc">The title text</div></li>
<li><b>value</b> : String<div class="sub-desc">The string value to set into the active textbox element if displayed</div></li>
<li><b>proxyDrag</b> : Boolean<div class="sub-desc">True to display a lightweight proxy while dragging (defaults to false)</div></li>
<li><b>title</b> : String<div class="sub-desc">The title text</div></li>
<li><b>value</b> : String<div class="sub-desc">The string value to set into the active textbox element if displayed</div></li>
msg: <em>'Please enter your address:'</em>,
width: 300,
buttons: Ext.MessageBox.OKCANCEL,
msg: <em>'Please enter your address:'</em>,
width: 300,
buttons: Ext.MessageBox.OKCANCEL,
fn: saveAddress,
animEl: <em>'addAddressBtn'</em>,
icon: Ext.MessageBox.INFO
fn: saveAddress,
animEl: <em>'addAddressBtn'</em>,
icon: Ext.MessageBox.INFO