In the following code snippet, the user clicks to delete an entry. A confirmation dialog pops up. If he/she does not confirm the delete, the user just wants to dismiss the dialog box. However, in the snippet, the item is deleted regardless of the dialog choice. What is the industry standard for just dismissing this dialog box?
<head>
<script language="Javascript" type="text/javascript">
function disp_confirm() {
if ( !confirm("Are you sure you want to delete this item?")) {
Just dismiss the confirm dialog box ;
}
}
</script>
</head>
<body>
<form action="delete.php" method="post">
<input type="submit" onclick="disp_confirm()" value="Delete">