Im using DHTMLX scheduler and I'm trying to delete an event when click on the delete button in the popup event editor, below is my code reference.
scheduler.attachEvent("onEventDeleted", function(id,ev){
$.ajax({
url : "calendar.php",
type: 'post',
data: { event_id : id},
success: function(e){
if($.trim(e) === "success"){
alert("Event was successfully deleted");
}
}
});
});
the above code works (The event was deleted successfully) but the problem is, the 'onEventDeleted' did also trigger when i click the cancel button from the popup editor. Any ideas, help, suggestions, recommendations, help please?