0

Here is my code

function destroy()
{
    if (confirm("Are you sure?")) {
        alert("User will be deleted")
    }

    else {

    }

}

But I don't want to show alert message, I want the user to be redirected by my own link. What should I write instead of alert to do that ?

gabriel angelos
  • 349
  • 1
  • 9
  • 23

1 Answers1

2
if (confirm("Are you sure?")) {
    window.location = 'your_link_here';
}
Achrome
  • 7,773
  • 14
  • 36
  • 45