Answers for "Add remove link dropzone"

0

Add remove link dropzone

$(".dz-remove").on("click", function (e) {
     e.preventDefault();
     e.stopPropagation();

     var imageId = $(this).parent().find(".dz-filename > span").text();

     $.ajax({
     url: "Your url here",
     data: { imageId: imageId},
     type: 'POST',
     success: function (data) {
          if (data.NotificationType === "Error") {
               toastr.error(data.Message);
          } else {
               toastr.success(data.Message);                          
          }},
          error: function (data) {
               toastr.error(data.Message);
          }
     })

});
Posted by: Guest on July-12-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language