I have a form containing a list of events. Next to each event is a Delete link. When clicked I want to delete that record out of the database. This is the first script I've tried to write and it doesn't work - I get the confirm message, but when I click Yes, nothing happens, no error message - it just leaves the event there.
In my Events table, the unique column is ID.
Here is my script:
<script>
function confirmDel(ID)
{
if (confirm("Are you sure you want to delete this Event? It CANNOT be recovered.")
{
document.location = "/events/eventlist.cfm?action=delID=" + ID;
}
}
</script>
And here's the code for the Delete link.
<a href="Javascript: confirmDel(#ID#)">Delete</a>
Can someone tell me what's wrong here?
Thanks,
Judy
In my Events table, the unique column is ID.
Here is my script:
<script>
function confirmDel(ID)
{
if (confirm("Are you sure you want to delete this Event? It CANNOT be recovered.")
{
document.location = "/events/eventlist.cfm?action=delID=" + ID;
}
}
</script>
And here's the code for the Delete link.
<a href="Javascript: confirmDel(#ID#)">Delete</a>
Can someone tell me what's wrong here?
Thanks,
Judy