I use the following AJAX call to update a certain table in the database:
$("#agenda_update_form").on("submit", function(e) {
e.preventDefault();
$.ajax({
url : "/admin/update_optreden",
type: "post",
data: $(this).serialize(),
success: function(data){
window.alert("Optreden was succesvol gewijzigd");
}
});
});
As you can see do I have an alert box in the success function. What I would like to accomplish is to redirect to another page (/admin/agenda) after the ok button on the alert box was pressed. How do I do that?
Thank you in advance.