A
Asif Rahman
Hi all!
Please improve on the following code to make sure the record gets deleted
only when the function returns false. Now I see the msgbox, but the record
gets deleted no matter the user clicks yes or no.
Thanks in advance.
Asif
=======================
Code:
<script language="VBScript">
Function confirmDelete()
answer = MsgBox("Are you sure you want to delete this one?",4,"Delete")
If answer = 6 Then
confirmDelete = true
Else
confirmDelete = false
End If
End Function
</script>
<%
Response.Write "<a href=AprDelete.asp?ID=" & RS.Fields("ID") & "><img
src=images/delete.gif border=0 onClick = 'ConfirmDelete()'></a>"
%>
Please improve on the following code to make sure the record gets deleted
only when the function returns false. Now I see the msgbox, but the record
gets deleted no matter the user clicks yes or no.
Thanks in advance.
Asif
=======================
Code:
<script language="VBScript">
Function confirmDelete()
answer = MsgBox("Are you sure you want to delete this one?",4,"Delete")
If answer = 6 Then
confirmDelete = true
Else
confirmDelete = false
End If
End Function
</script>
<%
Response.Write "<a href=AprDelete.asp?ID=" & RS.Fields("ID") & "><img
src=images/delete.gif border=0 onClick = 'ConfirmDelete()'></a>"
%>