i am trying to call start button from restart like below it is not working how can i achieve it ? as it is working in cancel button case
$( "#flash_screen" ).dialog({
autoOpen: false,
height: 500,
width: 1050,
modal: true,
buttons: {
"Start": function() { alert('start');
},
restart: function(){
$( this ).dialog( "Start" );
},
Cancel: function() {
$( this ).dialog( "close" );
}
},
close: function() {
allFields.val( "" ).removeClass( "ui-state-error" );
}
});
You’re not actually calling the Close function – you are passing “close” command to the
dialog, which calls the definedcloseevent handler.To do what you want, you should create a separate
Startfunction that you assign as both therestartandstartevent handlers: