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 > html
12389 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>
<script type="text/javascript"> function changeText(txt){ document.getElementById('the_text').innerHTML = txt; } </script> <p>Hello <b id='name'>World</b>. </p> <input type='button' onclick='changeText("Oliver")' value='Change Text'/>
#1 get coordinates #2 add meta tags to head <meta name="ICBM" content="XXX.XXXXX, YYY.YYYYY"> <meta name="DC.title" content="THE NAME OF YOUR SITE"> #3 ping http://geourl.org/ping/
<div style="text-align:center"> <div style="margin:auto">the text</div> </div>
<table><tr><td valign="middle">the text</td></tr></table>
<div style="display:table-cell; vertical-align: middle">the text</div>