title: Javascript How to use Confirm Dialog Box onSubmit with two submit buttons on JSP
body: <p>My form currently has two submit buttons. One for <code>Search</code> and the other for a <code>Mark Complete</code> function. I need to show a confirm dialog box ONLY when the "Mark Complete" button is clicked to submit the form with that validation is passed. Is it possible to identify this? I currently have the below <code>confirmComplete</code> function:</p>
  
  <pre><code>function confirmComplete() {
  alert("confirmComplete");
  var answer=confirm("Are you sure you want to continue");
  if (answer==true)
    {
      return true;
    }
  else
    {
      return false;
    }
  }
  </code></pre>
  
  <p>Any help would be appreciated!</p>