I have created a checkDelete function to ask the user if he wants to delete the selected entries from a database. The problem is that choosing cancel still deletes those entries.
This is the function:
function checkDelete (){
var answer = confirm("Are you sure you want to delete the selected entries?");
if (answer == true) {
document.forms[0].submit()
}
else
}
</script>
thank you.