title: How to make the confirmation box return true for javascript sweetalert2
body: <p>I want to change my alert box to Sweet Alert2 (<a href="https://sweetalert2.github.io/" rel="nofollow noreferrer">https://sweetalert2.github.io/</a>). After clicking the "Ok" button on the Confirm alert window, nothing seems to be happening. I can't seem to figure out what's wrong or how to solve the problem. my codes are as follows:</p>
  
  <p>Html:</p>
  
  <pre><code>&lt;a href="functionalities/removeIncoming.php?incId=&lt;?php echo $incID; ?&gt;"&gt; 
  &lt;button type="button" class="btn btn-default" id="delBtn" onclick="validateRemove(event);"&gt;
  &lt;span class="glyphicon glyphicon-book" aria-hidden="true"&gt;&lt;/span&gt;
  &lt;/button&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>function validateRemove(e) {
      e.preventDefault();
      swal({
    title: "Are you sure you want to archive this entry?",
    type: 'warning',
    showCancelButton: true,
    confirmButtonColor: '#3085d6',
    cancelButtonColor: '#d33',
    confirmButtonText: 'Yes',
    cancelButtonText: "No"
  }).then(function () {
    swal(
      'Archived',
      'Your file has been Archived.',
      'success'
    )
  })
  }
  </code></pre>