C'est une partie de ma fonction avec la question :
function deletePost() { var ask = window.confirm("Are you sure you want to delete this post?"); if (ask) { window.alert("This post was successfully deleted."); /* How to redirect to another page on confirm? */ } }
Il faut un Javascript pur.
essaye ça:
function deletePost() { var ask = window.confirm("Are you sure you want to delete this post?"); if (ask) { window.alert("This post was successfully deleted."); document.location.href = "window-location.html"; } }