Confirmation popup message when someone clicks a button

Some simple javascript to prompt the user when they click a submit button:

onclick="return confirm('Are you sure you want to delete?');"

UPDATE: this also works:


function ConfirmDelete()


var x = confirm("Are you sure you want to delete?");

if (x)

return true;


return false;



<input style='width:200px;height:40px;' type="submit" Onclick="return ConfirmDelete();" value="Delete" name="mysubmitdelete">