Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, any boude know how to fix this. I have this code to show bootbox.confirm when deleting a file, but it's not working.

$('#fileupload').fileupload({
    destroy: function (e, data) {
       var that = $(this).data('fileupload');  
          if (bootbox.confirm("Delete this file(s) ?") == true ) {
            if (data.url) {
                $.ajax(data)
                    .success(function () {
                          $(this).fadeOut(function () {
                            $(this).remove();
                        });
                    });
            } else {
               data.context.fadeOut(function () {
                 $(this).remove();
               });
            }
        }
    }
});
Posted

try like this,
C#
bootbox.confirm("Are you sure, you want to delete the User ?", function(result) {
    if (result === true) {
        //if true
    }else{
        //if not
    }
});
 
Share this answer
 
Thank you for your reply, i got it working with your code.
 
Share this answer
 
Comments
DiponRoy 29-Aug-14 9:42am    
:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900