May 122012

This is how to handle confirming a deletion request via javascript. The script is shown followed by an example form using the javascript function.

function confirmDelete(msg1) {
  var agree=confirm(msg1);
  if (agree)
    return true ;
    return false ;
<form action="index.php" method="POST" name="deleteForm">
  <input title="Delete" onclick="return confirmDelete('$confirmationText');"
         type="image" name="delete" src="images/del.png" alt="Delete" />
 Posted by at 12:01 am