EasyUI Forum
May 13, 2024, 07:44:44 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: add custom button in messager.confirm  (Read 8106 times)
Opan Mustopah
Full Member
***
Posts: 164


Indonesia


View Profile Email
« on: December 18, 2015, 03:12:42 AM »

title says all, it is possible to do that?
as far as i know, the only properties avaiable is "OK" and "Cancel" button.

thanks in advance
Logged

-- Bajak Otak --
*** Sorry for my bad english :3 ***
--JeasyUI version 1.4--
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 18, 2015, 08:39:23 AM »

You can redefine the 'buttons' property to custom the message buttons.
Code:
var dlg = $.messager.confirm({
    title: 'Confirm',
    msg: 'Are you sure?',
    buttons:[{
        text: 'Button1',
        onClick: function(){
            dlg.dialog('destroy')
        }
    },{
        text: 'Button2'
    },{
        text: 'Button3'
    }]
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!