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:

<script>

 function ConfirmDelete()
    {
      var x = confirm("Are you sure you want to delete?");
      if (x)
          return true;
      else
        return false;
    }
</script>


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