How to confirm before deletion through a submit button
I have a submit button which deletes some checked out records on my web page.
Now I want to add a messagebox before deleting the records, but somehow it is not working.
Upon selection of either of 'ok' and 'cancel' , it is deleting the record. How can I make sure that
delete only when 'ok' is pressed and 'Do not' delete when 'cancel' is pressed ?
Following is my code :
$cgi->submit(-label => "Remove selected records", -onClick => 'confirmBeforeDeletion()');
var con = confirm("Are you sure to delete");
if(con == true)