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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a Confirm Dialog before delete ...

Status
Not open for further replies.

Kenny100

Technical User
Feb 6, 2001
72
NZ
Hi Folks

I've got an anchor in my web page that when clicked, deletes a user from my database:

<a href=&quot;delete-user.asp?UserID=id&quot;>Delete User</a>

When the delete link is clicked I'd like a dialog box to appear that asks for confirmation before the delete is performed. How can I do this? I realise JavaScript is involved but I'm unsure how to implement it in this case.

Cheers,
Kenny.
 
Oops! Just figured it out.

In case anyone is interested ...

<a href=&quot;&quot; onClick=&quot;return confirm('Are you SURE you want to delete this record?')&quot;>Delete</a>

Cheers,
Kenny.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top