0

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

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();
    }
}
max
  • 96,212
  • 14
  • 104
  • 165
  • Tried to make it at least a little more understandable. – max Apr 28 '15 at 12:31
  • @ sir papirtiger....the confirm ok request is already good and its saving to the database but when i cancel my request is doesnt move to its original place or position ..i tried this code " args.preventDefault();" but its still doesnt move or undo the changes or move thati made....sorry for my bad english :) please help me – Jerbey Capoquian Apr 29 '15 at 09:16

0 Answers0