\[code\]<input type="button" value="http://stackoverflow.com/questions/10556116/Delete" onclick=show_confirm(http://mydomain.com/delete.php)>\[/code\]I have this button and this JavaScript function, but they don't work.When I click the button, nothing happens.What is wrong with my code?\[code\]function show_confirm(url){ var r = confirm("Do you want to delete this?"); if (r == true){ window.navigate(url); } else{ alert("You pressed Cancel."); } }\[/code\]