Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#GlobalDialogBox").dialog({
- modal: true,
- buttons: {
- "Yes": function () {
- callbackFunctionTrue();
- $(this).dialog('close');
- },
- "No": function () {
- callbackFunctionFalse();
- $(this).dialog('close');
- }
- }
- });
- alert("This should fire after answering the dialog box."); //but this fires as soon as the dialog pops up.. :(
- $("#GlobalDialogBox").on( "dialogclose", function( event, ui ) {
- alert("something");
- });
- $("#GlobalDialogBox").dialog({
- modal: true,
- buttons: {
- "Yes": function () {
- callbackFunctionTrue();
- $(this).dialog('close');
- },
- "No": function () {
- callbackFunctionFalse();
- $(this).dialog('close');
- }
- },
- close: function(event, ui){
- alert("something");
- }
- });
- function dialog_confirm(){
- $( "#dialog-confirm" ).dialog({
- //autoOpen: false,
- resizable: false,
- height:140,
- modal: true,
- buttons: {
- "Delete all items": function() {
- $( this ).dialog( "close" );
- dialog_confirm_callback(true);
- },
- Cancel: function() {
- $( this ).dialog( "close" );
- dialog_confirm_callback(false);
- }
- }
- });
- }
- function dialog_confirm_callback(value) {
- if (value) {
- alert("Confirmed");
- } else {
- alert("Rejected");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement