Take the 2-minute tour ×

Here is my code

function destroy()
        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 ?

share|improve this question
Did you search before asking this question? Duplicate of: stackoverflow.com/questions/4744751/javascript-redirect –  Afshin Mehrabani Feb 20 '13 at 9:33
add comment

1 Answer

up vote 2 down vote accepted
    window.location = 'your_link_here';
share|improve this answer
add comment

Your Answer


