Extjs Ext. MessageBox. confirm confirmation dialog box

Source: Internet
Author: User

Ext. MessageBox. confirm ()

A confirmation dialog box is displayed to replace the JavaScript standard confirm () method. There are two buttons: "yes" and "no". If you provide a callback function for it, the function will be called after the button is clicked (including the push button in the upper right corner). the id of the clicked button will be passed to the callback function as a unique parameter.
Call format:
Confirm (String title, String msg, [function fn], [Object scope])
Parameter description:
Ext. MessageBox. alert (); // related content
Return Value:
Ext. MessageBox
Sample Code:
Copy codeThe Code is as follows:
<Script type = "text/javascript">
Ext. onReady (function (){
Ext. MessageBox. confirm ('hprompt ', 'click I make select', callBack );
Function callBack (id ){
Alert ('click the button id: '+ id );
}
});
</Script>


The usage of Ext. MessageBox. confirm is similar to that of alert. The confirmation dialog box is asynchronously executed without blocking. Therefore, the code that can be executed after user confirmation must be placed in the callback function. The id in the input callback function is the unique method for distinguishing the user to select. You can determine this parameter to perform different operations.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.