[thelist] js alert to confirm deletion

Dunstan Orchard dunstan at 1976design.com
Tue Sep 24 14:39:01 CDT 2002


Hi there,

I'm sure this is very simple, but I can't get my brain around it:


I have a link in a PHP page that reloads that page (with all the query strings
as well) and tacks on an extra query:

<?php
$current_url = $_SERVER['REQUEST_URI'];

...

<a href="$current_url&amp;DelPic=$imageid" title="Delete this image">delete</a>
?>

And then some logic happens using the DelPic value.


I'd like to put a JS alert in there so that the user has to click on it to
confirm they want the delete to go ahead. And if the click 'NO' then the page
stays as it was.


Could anyone suggest how to do that? I can't work it out :o/


Thanks very much - dunstan

---------------------------
Dorset, England
http://www.1976design.com/
http://www.orchard.it/
http://www.maccaws.org/



More information about the thelist mailing list