title: HTML - How to do a Confirmation popup to a Submit button and then send the request?
body: <p>I am learning web development using <code>Django</code> and have some problems in where to put the code taking chage of whether to submit the request in the <code>HTML code</code>.</p>
  
  <p>Eg. There is webpage containing a <code>form</code>(a blog) to be filled by the user, and upon click on the Save button,there is a pop up asking whether you want to <code>confirm</code> or not. If click on <code>confirm</code>, then the request is sent.</p>
  
  <p>I searched and find this <code>javascript</code> code.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function clicked() {
      alert('clicked');
  }
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;input type="submit" onclick="clicked();" value="Button" /&gt;
  </code></pre>
  
  <p>But I guess this is not the correct function as it seems to me that whenever you click on the Button, the request will be submitted. So How can I delay the submit request until user has confirm the submit?</p>