Hello.
I have a problem when adding the javascript delete confirmation.
I use a page for both delete and update function.
The delete querystring is just like this :adm_data.asp?act=del&id=6
And the update goes this way :adm_data.asp?act=upd&id=6
I use this following code to processing delete:
If Request("act")="del" Then
Call Del() -----------------------> delete sub procedure
End If
I add this javascript confirmation ]
<SCRIPT LANGUAGE="JavaScript">
function confirmDelete()
{
var agree=confirm("Are you sure to delete?");
if (agree)
return true;
else
return false;
}
</SCRIPT>
I include the onclick=confirmDelete()
on the delete link which is located on side of each record that is shown.
When i click the delete link, the confirmation box appears. But even though i click the cancel button, the delete is still being executed.
I believe the problem is in the If Request("act")="del" Then*
Well any masters can help me solved the problem?
Any help will be apreciated.
Thanks....