how to pass the dialogue box buttons name as variable in jquery dialogue -
here want dialogue box button values 'yes','no' variable.i want pass variable butt1 buttons .
var button ='yes' $("#modal_confirm_yes_no").dialog({ bgiframe: true, autoopen: false, minheight: 200, width: 350, modal: true, closeonescape: false, draggable: false, resizable: false, buttons: { 'yes': function(){ $(this).dialog('close'); callback(true); }, 'no': function(){ $(this).dialog('close'); callback(false); } } });
var button ='yes' $("#modal_confirm_yes_no").dialog({ bgiframe: true, autoopen: false, minheight: 200, width: 350, modal: true, closeonescape: false, draggable: false, resizable: false, buttons: [ {text: button, click: function() { $(this).dialog('close'); callback(true); }}, {text: 'no', click: function() { $(this).dialog('close'); callback(false); }} ] });
Comments
Post a Comment