Hi,
I have built a small app to remove records from a table, it all works fine. The problem i have come across, is what if the user clicks delete and then decides that they do not want to delete the record. At the moment you click the image and the row goes with no warning.
I would like an alert box with something like "Are you sure you want to delete this" where the user can select "yes" or "no"
Here is a snippet of the code in case anyone can help out, i have tried javascript alerts but i can't cancel the action even if i click no. It's just a <a href with and image that snds a query string to a dynamic.asp page.
Thanks for any help.
I have built a small app to remove records from a table, it all works fine. The problem i have come across, is what if the user clicks delete and then decides that they do not want to delete the record. At the moment you click the image and the row goes with no warning.
I would like an alert box with something like "Are you sure you want to delete this" where the user can select "yes" or "no"
Here is a snippet of the code in case anyone can help out, i have tried javascript alerts but i can't cancel the action even if i click no. It's just a <a href with and image that snds a query string to a dynamic.asp page.
Thanks for any help.
Code:
<tr>
<td bgcolor="#cccccc"><a href="TechSupport.asp?typ=update&uniqueid=<% =(oRs("uniqueid")) %>&edituser=<% =Request.QueryString("user") %>"><img src="images/edit.gif" border="0" /></a></td>
<td bgcolor="#cccccc"><%=(oRs("createuser"))%></td>
<td bgcolor="#cccccc"><%=(oRs("createtime"))%></td>
<td bgcolor="#cccccc"><%=(oRs("subject"))%></td>
<td bgcolor="#cccccc"><%=(oRs("notes"))%></td>
<td bgcolor="#cccccc"><a href="dynamic.asp?typ=delete&uniqueid=<% =(oRs("uniqueid")) %>" onClick="BeSure()"><img src="images/delete.gif" border="0" /></a></td>
</tr>