title: Flask/HTML: Using a button to display confirmation message, then redirect
body: <p>New to Flask, I have implemented buttons to redirect onclick but I am having trouble with a button to redirect AFTER a confirmation message. In my HTML I have:</p>
  <p><code>&lt;button type=&quot;button&quot; name=&quot;deleteall&quot; value=False onclick=&quot;window.confirm('Are you sure you want to clear all entries?')&quot;&gt;Delete All&lt;/button&gt;</code></p>
  <p>The confirmation window appears as intended but I need to use the deleteall variable to redirect to my <code>@app.route('/deleteall')</code> in my app.py, else if the user cancels on the confirmation, do nothing.</p>
  <p>Do I even need to use name/value in the button tag? Is there a different way to achieve this?</p>
  <p>Any help would be much appreciated. Thanks!</p>