Forum Moderators: open
In this table I also have a link that will delete entries from the database when clicked. To this link I want to add functionality for a pop-up dialog where the user must confirm that they do indeed want to delete the entry. This is also simply done using some JavaScript like so:
<A HREF="test.htm" onCLick="return confirm('Are you SURE you want to delete this record?')">Delete It!</A>
However, I've encountered a problem when I try to add this code to my existing ASP code instide a Response.Write. I'm guessing my syntax needs to be tweaked due to the quotations or something. Here is the code I tried:
<%
response.write "<a href='/workshops/attend.asp?op1a=Delete&workshop=" & workshopname & "&dt=" & workshopdate & "&email=" & rs3("email") & "' onClick='return confirm('Are you sure you want to delete this entry?')'>Delete</a>"
%>
Can anyone see where I messed up in that code? The delete is still working but the pop-up dialog is not displayed. Alternatively, if someone knows of a better way to do this in ASP please share. Thanks.