[thelist] Triggering an alert box

Edwin Martin edwin at bitstorm.org
Sun Mar 27 02:53:56 CST 2005


Chris Kavanagh wrote:

> To business: I have an <A HREF> on my intranet site that deletes an 
> entry in the backend database.  The deletion can't be undone, so it 
> might be nice to have an alert box that warns of such before actually 
> completing the action.  What's the best way to do this?  I'm using 
> ColdFusion, but maybe the best solution is JavaScript?

Add a onclick-attribute:

<a href="..." onclick="return confirm('Do you really want to delete this 
permanently?')">...</a>

Very easy and effective. JavaScript has to be enabled, though.

Edwin Martin

-- 
http://www.bitstorm.org/edwin/en/



More information about the thelist mailing list