function confirmation(part_num) { var answer = confirm("Are you sure you want to delete this product? " + part_num + "") if (answer){ //window.location = "http://www.google.com/"; alert("Time to delete it!") } else{ alert("Don't delete it!") } }