Hi,
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 :
These above javascript function is not taking the appropriate action which I want. In both cases if and else, it is deleting the record.Code:$cgi->submit(-label => "Remove selected records", -onClick => 'confirmBeforeDeletion()'); function confirmBeforeDeletion { var con = confirm("Are you sure to delete"); if(con == true) { form.submit; } else { return; } }
Please help.


Reply With Quote
Bookmarks