Confirm Delete with javascript
// submit() is only called on true and submits the form
<h1>Howto Confirm Delete</h1> <form action="delete.html" method="post"> <input type="button" onclick="if (confirm('sure?')) submit();" value="delete"> </form>
DZone Snippets > ovhaag > delete
11381 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Oliver Haag www.ohcon.de
<h1>Howto Confirm Delete</h1> <form action="delete.html" method="post"> <input type="button" onclick="if (confirm('sure?')) submit();" value="delete"> </form>