Hi

I have an alert message that ask you to confirm if you want to delete a record or not. The thing is that even when I click on cancel it still deletes the record.
How can I set a behaviour that deletes the record if answer is yes and only closes the alert if it is no

i have done this:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<script type="text/JavaScript">

function MM_popupMsg(msg) {
confirm(msg);
}

</script>

and the link comes from:

<a href="delete.php?id=<?php echo $row['id']; ?>" onclick="MM_popupMsg('Are you sure you want to delete this record?')">Delete
</a>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Thank you a lot 4 any help provided