admin管理员组

文章数量:1332345

I have a problem about Ext.MessageBox.confirm method. I want to add a new line to confirm message but if i put \n it is not work, if i put html new line br it works but br is shown in message. My methot is shown below. br is inside <>

confirm: function(message, callback) {
    this.localizeExtMessageBox();
    Ext.MessageBox.confirm(this.getLocalizedString(Ab.view.View.z_MESSAGE_CONFIRM), message, callback);
}

How can i do that, thank you.

I have a problem about Ext.MessageBox.confirm method. I want to add a new line to confirm message but if i put \n it is not work, if i put html new line br it works but br is shown in message. My methot is shown below. br is inside <>

confirm: function(message, callback) {
    this.localizeExtMessageBox();
    Ext.MessageBox.confirm(this.getLocalizedString(Ab.view.View.z_MESSAGE_CONFIRM), message, callback);
}

How can i do that, thank you.

Share Improve this question asked Oct 4, 2013 at 12:31 eraraterarat 1662 silver badges9 bronze badges 1
  • Thank you i found solution, if i write [br] it works. – erarat Commented Oct 4, 2013 at 12:39
Add a ment  | 

1 Answer 1

Reset to default 8

Try this:

 Ext.MessageBox.show({
         title: 'my title',
         icon: Ext.Msg.QUESTION,
         msg: 'text here</br> other text in new line?',
         buttonText: { yes: "Yes", no: "No" },
         fn: function (btn) {
           if (btn == 'yes') {
            //your realization
           }
         }
       }
     });

本文标签: javascriptExtjs confirm method add new line characterStack Overflow