search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to undo the action DayPilot.Scheduler on event moved on the last event i saved without reloading the page?

Asked by Anonymous
4 years ago.

this is my code ....

if (response.result == "OK") {
if (confirm('Are you sure you want to edit this?')) {
DayPilot.request("backend_move.php",
function(req) { // success
var response = eval("(" +req.responseText + ")");
if (response && response.result) {dp.message("Moved: " +response.message);
}
},
args,
function(req) { // error
dp.message("Saving failed");
}
);
//loadEvents();
} else {

args.preventDefault();
}
}

Answer posted by Eddie
4 years ago.

try this code..
i hope i will helps you..
i did not use args.preventDefault(); but i use the code calling on events.php to load the updated data

dp.message("MoveCancelled");
DayPilot.request("backend_events.php", function(result) {
var data = eval("(" + result.responseText + ")");
dp.events.list = data;
dp.update();
});

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.