Ask for confirmation on form submit

Show a confirmation dialog upon submitting a dialog by using a standard button with a little JavaScript instead of a typical submit button.
  1. <form action=“ThePearl.html” method=“post”>
  2. <input type=“button” onclick=“if (confirm(‘Are you sure you want to submit this form?’)) submit();” value=“Submit”>
  3. </form>

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top