Posted by Toby A Inkster on 05/23/07 10:29
How about...
<a href="delete.php?id=123"
onclick="return confirm_delete(this);">delete</a>
function confirm_delete(link)
{
if (confirm("Delete entry?"))
{
link.href += "&sure=1";
return true;
}
else
return false;
}
Where "delete.php" deletes the item instantly if $_GET['sure']==1 and asks
for confirmation otherwise.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 88 days, 18:09.]
The Great Wi-Fi Controversy
http://tobyinkster.co.uk/blog/2007/05/22/wifi-scare/
Navigation:
[Reply to this message]
|