lovephp Posted March 4, 2016 Share Posted March 4, 2016 could anyone figure out how to add a popup dialog box asking you really want to delete this before it deletes anything on the following code de.onEventDeleted = function(args) { $.post("backend_delete.php", { id: args.e.id() }, function() { de.message("Deleted."); }); }; appreciate your time and help Quote Link to comment https://forums.phpfreaks.com/topic/300928-how-to-add-a-confirmation-dialog-box-here/ Share on other sites More sharing options...
requinix Posted March 4, 2016 Share Posted March 4, 2016 What's onEventDeleted? Something is firing off that event and that is where you need to put the confirmation dialog. Quote Link to comment https://forums.phpfreaks.com/topic/300928-how-to-add-a-confirmation-dialog-box-here/#findComment-1531695 Share on other sites More sharing options...
Solution lovephp Posted March 5, 2016 Author Solution Share Posted March 5, 2016 This code did it mate thanks de.onEventDelete = function(args) { if (!confirm("Do you really want to Delete this record?")) { args.preventDefault(); } }; i put it above the previous code. thanks for your time Quote Link to comment https://forums.phpfreaks.com/topic/300928-how-to-add-a-confirmation-dialog-box-here/#findComment-1531697 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.