title: javascript confirm() ok and cancel return same result
body: <p>This is my code:</p>
  
  <pre><code>&lt;input type="submit" value="Delete" onclick="del('Are you sure you want to Delete?')"&gt;
  
  &lt;script language="JavaScript"&gt;
  function del(display) 
  {   
      var inputs = document.myform;   
  
      if(inputs[5].value != '')
      {
          confirm(display);  
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>When I click either the "ok" or the "cancel", they both did the same way (the OK way)</p>
  
  <p>How can I make the "cancel" do what it is supposed to do?</p>
  
  <p>NOTE: I have a form there that I didn't include for the simplicity of question.</p>