How about this?

<script language="JavaScript">
        function delConfirm() {
                if(confirm("Are you sure you want to delete this item?")) {
                        return true;
                }
                else return false;
        }
</script>

Then in the delete link

<a href="delete.cfm?ID=#ID#" onClick="return delConfirm()">Delete</a></td>

Hope that helps.

Paul


> -----Original Message-----
> From: Michael [SMTP:[EMAIL PROTECTED]]
> Sent: 14 December 2000 20:13
> To:   CF-Talk
> Subject:      Delete method
> 
> 
> 
> I have the following code on an action page that is being called from a
> delete reference on the main page, however I want it so that when the
> click the delete, it ask's them are they sure , absolutely sure, and
> then delete the record.  Right now if I delete, it just goes, and
> deletes.    I know this is'nt Rocket science but I just dont remember
> how the coding  goes.
> 
> TIA
> 
> Michael
> <cfquery name="qry_delete_interview" datasource="Interview" username=""
> password="" >
> DELETE FROM interview
> WHERE ID = #URL.DID#
> </cfquery>
> <CFLOCATION URL="intvlist.cfm">
> 
> 
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to