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

Alert Box Question

Status
Not open for further replies.

Lambro

Programmer
Aug 22, 2001
258
US
I would like it when this link is clicked for a alert box to pop up asking if there sure they want to delete this record. If yes, then the record is deleted, if no, then nothing happens. Here's my code:

Response.Write (&quot;<img src = edit.gif>&nbsp;<a href=delete.asp?ID=&quot; & (recordset(&quot;ID&quot;)) &&quot;><img src = x.gif></a>&quot;)

Thanks
 
how would I put it into my string:

Response.Write (&quot;<img src = edit.gif> <a href=delete.asp?ID=&quot; & (recordset(&quot;ID&quot;)) &&quot;><img src = x.gif></a>&quot;)
 
This is my function:

function Del()
{
return confirm(&quot;You have chosen to delete&quot;);
return false;
}



This is my string:

Response.Write (&quot;<img src = edit.gif> <a href=delete.asp?ID=&quot; & (recordset(&quot;ID&quot;)) & &quot; onClick='Del();'>DELETE</a>&quot;)


It prompts with a alert box, but when I click either yes or no it deletes on both. How do I fix this?

Thanks
 
Response.Write (&quot;<img src = edit.gif> <a href=delete.asp?ID=&quot; & (recordset(&quot;ID&quot;)) & &quot; onClick='return Del();'>DELETE</a>&quot;)


=========================================================
while (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top