commit extjs-2.2.1
[extjs.git] / docs / output / Ext.MessageBox.html
1         <div class="body-wrap">
2         <div class="top-tools">
3             <a class="inner-link" href="#Ext.MessageBox-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4             <a class="inner-link" href="#Ext.MessageBox-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5             <a class="inner-link" href="#Ext.MessageBox-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6                         <a class="bookmark" href="../docs/?class=Ext.MessageBox"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
7         </div>
8                 <h1>Class Ext.MessageBox</h1>
9         <table cellspacing="0">
10             <tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr>
11             <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/MessageBox.js" target="_blank">MessageBox.js</a></td></tr>
12             <tr><td class="label">Class:</td><td class="hd-info">MessageBox</td></tr>
13                                     <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
14                     </table>
15         <div class="description">
16             *
17 <p>Utility class for generating different styles of message boxes.  The alias Ext.Msg can also be used.<p/>
18 <p>Note that the MessageBox is asynchronous.  Unlike a regular JavaScript <code>alert</code> (which will halt
19 browser execution), showing a MessageBox will not cause the code to stop.  For this reason, if you have code
20 that should only run <em>after</em> some user feedback from the MessageBox, you must use a callback function
21 (see the <code>function</code> parameter for <a ext:cls="Ext.MessageBox" ext:member="show" href="output/Ext.MessageBox.html#show">show</a> for more details).</p>
22 <p>Example usage:</p>
23 <pre><code><i>// Basic alert:</i>
24 Ext.Msg.alert(<em>'Status'</em>, <em>'Changes saved successfully.'</em>);
25
26 <i>// Prompt <b>for</b> user data and process the result using a callback:</i>
27 Ext.Msg.prompt(<em>'Name'</em>, <em>'Please enter your name:'</em>, <b>function</b>(btn, text){
28     <b>if</b> (btn == <em>'ok'</em>){
29         <i>// process text value and close...</i>
30     }
31 });
32
33 <i>// Show a dialog using config options:</i>
34 Ext.Msg.show({
35    title:<em>'Save Changes?'</em>,
36    msg: <em>'You are closing a tab that has unsaved changes. Would you like to save your changes?'</em>,
37    buttons: Ext.Msg.YESNOCANCEL,
38    fn: processResult,
39    animEl: <em>'elId'</em>,
40    icon: Ext.MessageBox.QUESTION
41 });</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i>        </div>
42         
43         <div class="hr"></div>
44                 <a id="Ext.MessageBox-props"></a>
45         <h2>Public Properties</h2>
46                 <table cellspacing="0" class="member-table">
47             <tr>
48                 <th class="sig-header" colspan="2">Property</th>
49                 <th class="msource-header">Defined By</th>
50             </tr>
51                 <tr class="property-row">\r
52         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
53         <td class="sig">\r
54         <a id="Ext.MessageBox-CANCEL"></a>\r
55             <b>CANCEL</b> : Object            <div class="mdesc">\r
56                             Button config that displays a single Cancel button                        </div>\r
57         </td>\r
58         <td class="msource">MessageBox</td>\r
59     </tr>\r
60         <tr class="property-row alt">\r
61         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
62         <td class="sig">\r
63         <a id="Ext.MessageBox-ERROR"></a>\r
64             <b>ERROR</b> : String            <div class="mdesc">\r
65                             The CSS class that provides the ERROR icon image                        </div>\r
66         </td>\r
67         <td class="msource">MessageBox</td>\r
68     </tr>\r
69         <tr class="property-row">\r
70         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
71         <td class="sig">\r
72         <a id="Ext.MessageBox-INFO"></a>\r
73             <b>INFO</b> : String            <div class="mdesc">\r
74                             The CSS class that provides the INFO icon image                        </div>\r
75         </td>\r
76         <td class="msource">MessageBox</td>\r
77     </tr>\r
78         <tr class="property-row alt">\r
79         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
80         <td class="sig">\r
81         <a id="Ext.MessageBox-OK"></a>\r
82             <b>OK</b> : Object            <div class="mdesc">\r
83                             Button config that displays a single OK button                        </div>\r
84         </td>\r
85         <td class="msource">MessageBox</td>\r
86     </tr>\r
87         <tr class="property-row">\r
88         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
89         <td class="sig">\r
90         <a id="Ext.MessageBox-OKCANCEL"></a>\r
91             <b>OKCANCEL</b> : Object            <div class="mdesc">\r
92                             Button config that displays OK and Cancel buttons                        </div>\r
93         </td>\r
94         <td class="msource">MessageBox</td>\r
95     </tr>\r
96         <tr class="property-row alt">\r
97         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
98         <td class="sig">\r
99         <a id="Ext.MessageBox-QUESTION"></a>\r
100             <b>QUESTION</b> : String            <div class="mdesc">\r
101                             The CSS class that provides the QUESTION icon image                        </div>\r
102         </td>\r
103         <td class="msource">MessageBox</td>\r
104     </tr>\r
105         <tr class="property-row">\r
106         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
107         <td class="sig">\r
108         <a id="Ext.MessageBox-WARNING"></a>\r
109             <b>WARNING</b> : String            <div class="mdesc">\r
110                             The CSS class that provides the WARNING icon image                        </div>\r
111         </td>\r
112         <td class="msource">MessageBox</td>\r
113     </tr>\r
114         <tr class="property-row alt">\r
115         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
116         <td class="sig">\r
117         <a id="Ext.MessageBox-YESNO"></a>\r
118             <b>YESNO</b> : Object            <div class="mdesc">\r
119                             Button config that displays Yes and No buttons                        </div>\r
120         </td>\r
121         <td class="msource">MessageBox</td>\r
122     </tr>\r
123         <tr class="property-row">\r
124         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
125         <td class="sig">\r
126         <a id="Ext.MessageBox-YESNOCANCEL"></a>\r
127             <b>YESNOCANCEL</b> : Object            <div class="mdesc">\r
128                             Button config that displays Yes, No and Cancel buttons                        </div>\r
129         </td>\r
130         <td class="msource">MessageBox</td>\r
131     </tr>\r
132         <tr class="property-row alt expandable">\r
133         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
134         <td class="sig">\r
135         <a id="Ext.MessageBox-buttonText"></a>\r
136             <b>buttonText</b> : Object            <div class="mdesc">\r
137                         <div class="short">An object containing the default button text strings that can be overriden for localized language support.
138 Supported ...</div>\r
139             <div class="long">\r
140                 An object containing the default button text strings that can be overriden for localized language support.
141 Supported properties are: ok, cancel, yes and no.  Generally you should include a locale-specific
142 resource file for handling language support across the framework.
143 Customize the default text like so: Ext.MessageBox.buttonText.yes = "oui"; //french            </div>\r
144                         </div>\r
145         </td>\r
146         <td class="msource">MessageBox</td>\r
147     </tr>\r
148         <tr class="property-row">\r
149         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
150         <td class="sig">\r
151         <a id="Ext.MessageBox-defaultTextHeight"></a>\r
152             <b>defaultTextHeight</b> : Number            <div class="mdesc">\r
153                             The default height in pixels of the message box's multiline textarea if displayed (defaults to 75)                        </div>\r
154         </td>\r
155         <td class="msource">MessageBox</td>\r
156     </tr>\r
157         <tr class="property-row alt">\r
158         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
159         <td class="sig">\r
160         <a id="Ext.MessageBox-maxWidth"></a>\r
161             <b>maxWidth</b> : Number            <div class="mdesc">\r
162                             The maximum width in pixels of the message box (defaults to 600)                        </div>\r
163         </td>\r
164         <td class="msource">MessageBox</td>\r
165     </tr>\r
166         <tr class="property-row expandable">\r
167         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
168         <td class="sig">\r
169         <a id="Ext.MessageBox-minProgressWidth"></a>\r
170             <b>minProgressWidth</b> : Number            <div class="mdesc">\r
171                         <div class="short">The minimum width in pixels of the message box if it is a progress-style dialog.  This is useful
172 for setting a differ...</div>\r
173             <div class="long">\r
174                 The minimum width in pixels of the message box if it is a progress-style dialog.  This is useful
175 for setting a different minimum width than text-only dialogs may need (defaults to 250)            </div>\r
176                         </div>\r
177         </td>\r
178         <td class="msource">MessageBox</td>\r
179     </tr>\r
180         <tr class="property-row alt">\r
181         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
182         <td class="sig">\r
183         <a id="Ext.MessageBox-minWidth"></a>\r
184             <b>minWidth</b> : Number            <div class="mdesc">\r
185                             The minimum width in pixels of the message box (defaults to 100)                        </div>\r
186         </td>\r
187         <td class="msource">MessageBox</td>\r
188     </tr>\r
189             </table>
190                 <a id="Ext.MessageBox-methods"></a>
191         <h2>Public Methods</h2>
192                 <table cellspacing="0" class="member-table">
193             <tr>
194                 <th class="sig-header" colspan="2">Method</th>
195                 <th class="msource-header">Defined By</th>
196             </tr>
197                 <tr class="method-row expandable">\r
198         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
199         <td class="sig">\r
200         <a id="Ext.MessageBox-alert"></a>\r
201             <b>alert</b>(&nbsp;<code>String title</code>, <code>String msg</code>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : Ext.MessageBox            <div class="mdesc">\r
202                         <div class="short">Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).
203 If a c...</div>\r
204             <div class="long">\r
205                 Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).
206 If a callback function is passed it will be called after the user clicks the button, and the
207 id of the button that was clicked will be passed as the only parameter to the callback
208 (could also be the top-right close button).    <div class="mdetail-params">\r
209         <strong>Parameters:</strong>\r
210         <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>\r
211         <strong>Returns:</strong>\r
212         <ul>\r
213             <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>\r
214         </ul>\r
215     </div>\r
216                 </div>\r
217                         </div>\r
218         </td>\r
219         <td class="msource">MessageBox</td>\r
220     </tr>\r
221         <tr class="method-row alt expandable">\r
222         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
223         <td class="sig">\r
224         <a id="Ext.MessageBox-confirm"></a>\r
225             <b>confirm</b>(&nbsp;<code>String title</code>, <code>String msg</code>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : Ext.MessageBox            <div class="mdesc">\r
226                         <div class="short">Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).
227 If a callback funct...</div>\r
228             <div class="long">\r
229                 Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).
230 If a callback function is passed it will be called after the user clicks either button,
231 and the id of the button that was clicked will be passed as the only parameter to the callback
232 (could also be the top-right close button).    <div class="mdetail-params">\r
233         <strong>Parameters:</strong>\r
234         <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>\r
235         <strong>Returns:</strong>\r
236         <ul>\r
237             <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>\r
238         </ul>\r
239     </div>\r
240                 </div>\r
241                         </div>\r
242         </td>\r
243         <td class="msource">MessageBox</td>\r
244     </tr>\r
245         <tr class="method-row expandable">\r
246         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
247         <td class="sig">\r
248         <a id="Ext.MessageBox-getDialog"></a>\r
249             <b>getDialog</b>() : Ext.Window            <div class="mdesc">\r
250                         <div class="short">Returns a reference to the underlying <a ext:cls="Ext.Window" href="output/Ext.Window.html">Ext.Window</a> element</div>\r
251             <div class="long">\r
252                 Returns a reference to the underlying <a ext:cls="Ext.Window" href="output/Ext.Window.html">Ext.Window</a> element    <div class="mdetail-params">\r
253         <strong>Parameters:</strong>\r
254         <ul><li>None.</li>        </ul>\r
255         <strong>Returns:</strong>\r
256         <ul>\r
257             <li><code>Ext.Window</code><div class="sub-desc">The window</div></li>\r
258         </ul>\r
259     </div>\r
260                 </div>\r
261                         </div>\r
262         </td>\r
263         <td class="msource">MessageBox</td>\r
264     </tr>\r
265         <tr class="method-row alt expandable">\r
266         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
267         <td class="sig">\r
268         <a id="Ext.MessageBox-hide"></a>\r
269             <b>hide</b>() : Ext.MessageBox            <div class="mdesc">\r
270                         <div class="short">Hides the message box if it is displayed</div>\r
271             <div class="long">\r
272                 Hides the message box if it is displayed    <div class="mdetail-params">\r
273         <strong>Parameters:</strong>\r
274         <ul><li>None.</li>        </ul>\r
275         <strong>Returns:</strong>\r
276         <ul>\r
277             <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>\r
278         </ul>\r
279     </div>\r
280                 </div>\r
281                         </div>\r
282         </td>\r
283         <td class="msource">MessageBox</td>\r
284     </tr>\r
285         <tr class="method-row expandable">\r
286         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
287         <td class="sig">\r
288         <a id="Ext.MessageBox-isVisible"></a>\r
289             <b>isVisible</b>() : Boolean            <div class="mdesc">\r
290                         <div class="short">Returns true if the message box is currently displayed</div>\r
291             <div class="long">\r
292                 Returns true if the message box is currently displayed    <div class="mdetail-params">\r
293         <strong>Parameters:</strong>\r
294         <ul><li>None.</li>        </ul>\r
295         <strong>Returns:</strong>\r
296         <ul>\r
297             <li><code>Boolean</code><div class="sub-desc">True if the message box is visible, else false</div></li>\r
298         </ul>\r
299     </div>\r
300                 </div>\r
301                         </div>\r
302         </td>\r
303         <td class="msource">MessageBox</td>\r
304     </tr>\r
305         <tr class="method-row alt expandable">\r
306         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
307         <td class="sig">\r
308         <a id="Ext.MessageBox-progress"></a>\r
309             <b>progress</b>(&nbsp;<code>String title</code>, <code>String msg</code>, <span class="optional" title="Optional">[<code>String progressText</code>]</span>&nbsp;) : Ext.MessageBox            <div class="mdesc">\r
310                         <div class="short">Displays a message box with a progress bar.  This message box has no buttons and is not closeable by
311 the user.  You a...</div>\r
312             <div class="long">\r
313                 Displays a message box with a progress bar.  This message box has no buttons and is not closeable by
314 the user.  You are responsible for updating the progress bar as needed via <a ext:cls="Ext.MessageBox" ext:member="updateProgress" href="output/Ext.MessageBox.html#updateProgress">Ext.MessageBox.updateProgress</a>
315 and closing the message box when the process is complete.    <div class="mdetail-params">\r
316         <strong>Parameters:</strong>\r
317         <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>progressText</code> : String<div class="sub-desc">(optional) The text to display inside the progress bar (defaults to '')</div></li>        </ul>\r
318         <strong>Returns:</strong>\r
319         <ul>\r
320             <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>\r
321         </ul>\r
322     </div>\r
323                 </div>\r
324                         </div>\r
325         </td>\r
326         <td class="msource">MessageBox</td>\r
327     </tr>\r
328         <tr class="method-row expandable">\r
329         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
330         <td class="sig">\r
331         <a id="Ext.MessageBox-prompt"></a>\r
332             <b>prompt</b>(&nbsp;<code>String title</code>, <code>String msg</code>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Boolean/Number multiline</code>]</span>, <span class="optional" title="Optional">[<code>String value</code>]</span>&nbsp;) : Ext.MessageBox            <div class="mdesc">\r
333                         <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>\r
334             <div class="long">\r
335                 Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt).
336 The prompt can be a single-line or multi-line textbox.  If a callback function is passed it will be called after the user
337 clicks either button, and the id of the button that was clicked (could also be the top-right
338 close button) and the text that was entered will be passed as the two parameters to the callback.    <div class="mdetail-params">\r
339         <strong>Parameters:</strong>\r
340         <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
341 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>\r
342         <strong>Returns:</strong>\r
343         <ul>\r
344             <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>\r
345         </ul>\r
346     </div>\r
347                 </div>\r
348                         </div>\r
349         </td>\r
350         <td class="msource">MessageBox</td>\r
351     </tr>\r
352         <tr class="method-row alt expandable">\r
353         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
354         <td class="sig">\r
355         <a id="Ext.MessageBox-setIcon"></a>\r
356             <b>setIcon</b>(&nbsp;<code>String icon</code>&nbsp;) : Ext.MessageBox            <div class="mdesc">\r
357                         <div class="short">Adds the specified icon to the dialog.  By default, the class 'ext-mb-icon' is applied for default
358 styling, and the c...</div>\r
359             <div class="long">\r
360                 Adds the specified icon to the dialog.  By default, the class 'ext-mb-icon' is applied for default
361 styling, and the class passed in is expected to supply the background image url. Pass in empty string ('')
362 to clear any existing icon.  The following built-in icon classes are supported, but you can also pass
363 in a custom class name:
364 <pre>Ext.MessageBox.INFO\r
365 Ext.MessageBox.WARNING\r
366 Ext.MessageBox.QUESTION\r
367 Ext.MessageBox.ERROR</pre>    <div class="mdetail-params">\r
368         <strong>Parameters:</strong>\r
369         <ul><li><code>icon</code> : String<div class="sub-desc">A CSS classname specifying the icon's background image url, or empty string to clear the icon</div></li>        </ul>\r
370         <strong>Returns:</strong>\r
371         <ul>\r
372             <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>\r
373         </ul>\r
374     </div>\r
375                 </div>\r
376                         </div>\r
377         </td>\r
378         <td class="msource">MessageBox</td>\r
379     </tr>\r
380         <tr class="method-row expandable">\r
381         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
382         <td class="sig">\r
383         <a id="Ext.MessageBox-show"></a>\r
384             <b>show</b>(&nbsp;<code>Object config</code>&nbsp;) : Ext.MessageBox            <div class="mdesc">\r
385                         <div class="short">Displays a new message box, or reinitializes an existing message box, based on the config options
386 passed in. All disp...</div>\r
387             <div class="long">\r
388                 Displays a new message box, or reinitializes an existing message box, based on the config options
389 passed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally,
390 although those calls are basic shortcuts and do not support all of the config options allowed here.    <div class="mdetail-params">\r
391         <strong>Parameters:</strong>\r
392         <ul><li><code>config</code> : Object<div class="sub-desc">The following config options are supported: <ul>
393 <li><b>animEl</b> : String/Element<div class="sub-desc">An id or Element from which the message box should animate as it
394 opens and closes (defaults to undefined)</div></li>
395 <li><b>buttons</b> : Object/Boolean<div class="sub-desc">A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo',
396 cancel:'Bar'}), or false to not show any buttons (defaults to false)</div></li>
397 <li><b>closable</b> : Boolean<div class="sub-desc">False to hide the top-right close button (defaults to true). Note that
398 progress and wait dialogs will ignore this property and always hide the close button as they can only
399 be closed programmatically.</div></li>
400 <li><b>cls</b> : String<div class="sub-desc">A custom CSS class to apply to the message box's container element</div></li>
401 <li><b>defaultTextHeight</b> : Number<div class="sub-desc">The default height in pixels of the message box's multiline textarea
402 if displayed (defaults to 75)</div></li>
403 <li><b>fn</b> : Function<div class="sub-desc">A callback function which is called when the dialog is dismissed either
404 by clicking on the configured buttons, or on the dialog close button, or by pressing
405 the return button to enter input.
406 <p>Progress and wait dialogs will ignore this option since they do not respond to user
407 actions and can only be closed programmatically, so any required function should be called
408 by the same code after it closes the dialog. Parameters passed:<ul>
409 <li><b>buttonId</b> : String<div class="sub-desc">The ID of the button pressed, one of:<div class="sub-desc"><ul>
410 <li><tt>ok</tt></li>
411 <li><tt>yes</tt></li>
412 <li><tt>no</tt></li>
413 <li><tt>cancel</tt></li>
414 </ul></div></div></li>
415 <li><b>text</b> : String<div class="sub-desc">Value of the input field if either <tt><a href="#show-option-prompt" ext:member="show-option-prompt" ext:cls="Ext.MessageBox">prompt</a></tt>
416 or <tt><a href="#show-option-multiline" ext:member="show-option-multiline" ext:cls="Ext.MessageBox">multiline</a></tt> is true</div></li>
417 <li><b>opt</b> : Object<div class="sub-desc">The config object passed to show.</div></li>
418 </ul></p></div></li>
419 <li><b>scope</b> : Object<div class="sub-desc">The scope of the callback function</div></li>
420 <li><b>icon</b> : String<div class="sub-desc">A CSS class that provides a background image to be used as the body icon for the
421 dialog (e.g. Ext.MessageBox.WARNING or 'custom-class') (defaults to '')</div></li>
422 <li><b>iconCls</b> : String<div class="sub-desc">The standard <a ext:cls="Ext.Window" ext:member="iconCls" href="output/Ext.Window.html#iconCls">Ext.Window.iconCls</a> to
423 add an optional header icon (defaults to '')</div></li>
424 <li><b>maxWidth</b> : Number<div class="sub-desc">The maximum width in pixels of the message box (defaults to 600)</div></li>
425 <li><b>minWidth</b> : Number<div class="sub-desc">The minimum width in pixels of the message box (defaults to 100)</div></li>
426 <li><b>modal</b> : Boolean<div class="sub-desc">False to allow user interaction with the page while the message box is
427 displayed (defaults to true)</div></li>
428 <li><b>msg</b> : String<div class="sub-desc">A string that will replace the existing message box body text (defaults to the
429 XHTML-compliant non-breaking space character '&amp;#160;')</div></li>
430 <li><a id="show-option-multiline"></a><b>multiline</b> : Boolean<div class="sub-desc">
431 True to prompt the user to enter multi-line text (defaults to false)</div></li>
432 <li><b>progress</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>
433 <li><b>progressText</b> : String<div class="sub-desc">The text to display inside the progress bar if progress = true (defaults to '')</div></li>
434 <li><a id="show-option-prompt"></a><b>prompt</b> : Boolean<div class="sub-desc">True to prompt the user to enter single-line text (defaults to false)</div></li>
435 <li><b>proxyDrag</b> : Boolean<div class="sub-desc">True to display a lightweight proxy while dragging (defaults to false)</div></li>
436 <li><b>title</b> : String<div class="sub-desc">The title text</div></li>
437 <li><b>value</b> : String<div class="sub-desc">The string value to set into the active textbox element if displayed</div></li>
438 <li><b>wait</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>
439 <li><b>waitConfig</b> : Object<div class="sub-desc">A <a ext:cls="Ext.ProgressBar" ext:member="waitConfig" href="output/Ext.ProgressBar.html#waitConfig">Ext.ProgressBar.waitConfig</a> object (applies only if wait = true)</div></li>
440 <li><b>width</b> : Number<div class="sub-desc">The width of the dialog in pixels</div></li>
441 </ul>
442 Example usage:
443 <pre><code>Ext.Msg.show({
444    title: <em>'Address'</em>,
445    msg: <em>'Please enter your address:'</em>,
446    width: 300,
447    buttons: Ext.MessageBox.OKCANCEL,
448    multiline: true,
449    fn: saveAddress,
450    animEl: <em>'addAddressBtn'</em>,
451    icon: Ext.MessageBox.INFO
452 });</code></pre></div></li>        </ul>\r
453         <strong>Returns:</strong>\r
454         <ul>\r
455             <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>\r
456         </ul>\r
457     </div>\r
458                 </div>\r
459                         </div>\r
460         </td>\r
461         <td class="msource">MessageBox</td>\r
462     </tr>\r
463         <tr class="method-row alt expandable">\r
464         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
465         <td class="sig">\r
466         <a id="Ext.MessageBox-updateProgress"></a>\r
467             <b>updateProgress</b>(&nbsp;<code>Number value</code>, <code>String progressText</code>, <code>String msg</code>&nbsp;) : Ext.MessageBox            <div class="mdesc">\r
468                         <div class="short">Updates a progress-style message box's text and progress bar. Only relevant on message boxes
469 initiated via Ext.Messag...</div>\r
470             <div class="long">\r
471                 Updates a progress-style message box's text and progress bar. Only relevant on message boxes
472 initiated via <a ext:cls="Ext.MessageBox" ext:member="progress" href="output/Ext.MessageBox.html#progress">Ext.MessageBox.progress</a> or <a ext:cls="Ext.MessageBox" ext:member="wait" href="output/Ext.MessageBox.html#wait">Ext.MessageBox.wait</a>,
473 or by calling <a ext:cls="Ext.MessageBox" ext:member="show" href="output/Ext.MessageBox.html#show">Ext.MessageBox.show</a> with progress: true.    <div class="mdetail-params">\r
474         <strong>Parameters:</strong>\r
475         <ul><li><code>value</code> : Number<div class="sub-desc">Any number between 0 and 1 (e.g., .5, defaults to 0)</div></li><li><code>progressText</code> : String<div class="sub-desc">The progress text to display inside the progress bar (defaults to '')</div></li><li><code>msg</code> : String<div class="sub-desc">The message box's body text is replaced with the specified string (defaults to undefined
476 so that any existing body text will not get overwritten by default unless a new value is passed in)</div></li>        </ul>\r
477         <strong>Returns:</strong>\r
478         <ul>\r
479             <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>\r
480         </ul>\r
481     </div>\r
482                 </div>\r
483                         </div>\r
484         </td>\r
485         <td class="msource">MessageBox</td>\r
486     </tr>\r
487         <tr class="method-row expandable">\r
488         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
489         <td class="sig">\r
490         <a id="Ext.MessageBox-updateText"></a>\r
491             <b>updateText</b>(&nbsp;<span class="optional" title="Optional">[<code>String text</code>]</span>&nbsp;) : Ext.MessageBox            <div class="mdesc">\r
492                         <div class="short">Updates the message box body text</div>\r
493             <div class="long">\r
494                 Updates the message box body text    <div class="mdetail-params">\r
495         <strong>Parameters:</strong>\r
496         <ul><li><code>text</code> : String<div class="sub-desc">(optional) Replaces the message box element's innerHTML with the specified string (defaults to
497 the XHTML-compliant non-breaking space character '&amp;#160;')</div></li>        </ul>\r
498         <strong>Returns:</strong>\r
499         <ul>\r
500             <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>\r
501         </ul>\r
502     </div>\r
503                 </div>\r
504                         </div>\r
505         </td>\r
506         <td class="msource">MessageBox</td>\r
507     </tr>\r
508         <tr class="method-row alt expandable">\r
509         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
510         <td class="sig">\r
511         <a id="Ext.MessageBox-wait"></a>\r
512             <b>wait</b>(&nbsp;<code>String msg</code>, <span class="optional" title="Optional">[<code>String title</code>]</span>, <span class="optional" title="Optional">[<code>Object config</code>]</span>&nbsp;) : Ext.MessageBox            <div class="mdesc">\r
513                         <div class="short">Displays a message box with an infinitely auto-updating progress bar.  This can be used to block user
514 interaction whi...</div>\r
515             <div class="long">\r
516                 Displays a message box with an infinitely auto-updating progress bar.  This can be used to block user
517 interaction while waiting for a long-running process to complete that does not have defined intervals.
518 You are responsible for closing the message box when the process is complete.    <div class="mdetail-params">\r
519         <strong>Parameters:</strong>\r
520         <ul><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>title</code> : String<div class="sub-desc">(optional) The title bar text</div></li><li><code>config</code> : Object<div class="sub-desc">(optional) A <a ext:cls="Ext.ProgressBar" ext:member="waitConfig" href="output/Ext.ProgressBar.html#waitConfig">Ext.ProgressBar.waitConfig</a> object</div></li>        </ul>\r
521         <strong>Returns:</strong>\r
522         <ul>\r
523             <li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li>\r
524         </ul>\r
525     </div>\r
526                 </div>\r
527                         </div>\r
528         </td>\r
529         <td class="msource">MessageBox</td>\r
530     </tr>\r
531             </table>
532                 <a id="Ext.MessageBox-events"></a>
533         <h2>Public Events</h2>
534         <div class="no-members">This class has no public events.</div>
535         </div>