extjs - Adding a message box to a button icon -


i trying add message box when user clicks on button. code have:

{                                 text: 'button icon',                                 id: 'buttonicon',                                 cls: 'x-btn-text-icon',                                 launch: function() {                                     ext.messagebox.show({                                         title: "",                                         msg: "message text",                                         icon: ext.messagebox.warning,                                         buttons: ext.messagebox.okcancel,                                         fn: function(buttonicon) {                                             if (buttonicon === "ok") {                                                 alert("done!")                                             }                                         }                                     });                                 } 

right mow, when click on button icon nothing happens @ , need display message have entered. please help.

a button doesn't have launch function, instead need use handler function.

like this:

{     text: 'button icon',     id: 'buttonicon',     cls: 'x-btn-text-icon',     handler: function() {         ext.messagebox.show({             title: "",             msg: "message text",             icon: ext.messagebox.warning,             buttons: ext.messagebox.okcancel,             fn: function(buttonicon) {                 if (buttonicon === "ok") {                     alert("done!")                 }             }         });     } } 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -