Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with confirmDel to delete a database record

Status
Not open for further replies.

judym5

Programmer
Joined
Apr 10, 2002
Messages
6
Location
US
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(&quot;Are you sure you want to delete this Event? It CANNOT be recovered.&quot;))
{
document.location = &quot;/events/eventlist.cfm?action=delID=&quot; + ID;
}
}

</script>

And here's the code for the Delete link.

<a href=&quot;Javascript: confirmDel(#ID#)&quot;>Delete</a>

Can someone tell me what's wrong here?

Thanks,

Judy
 
document.location = &quot;/events/eventlist.cfm?action=delID=&quot; + ID;

Should be changed to :

window.location = &quot;/events/eventlist.cfm?action=delID=&quot; + ID;

Let me know if that fixes it. :) Gary Haran
 
I change it, but that didn't fix it. The record still remains in the event list.
 
well it seems to be a problem with your cold fusion side of things. sorry can't help you there. Try the coldfusion forum. Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top