title: Javascript - Custom Confirm Dialog - replacing JS confirm
body: <p>This may be a easy answer-</p>
  
  <p>In my JS I've replaced JS's confirm function with my own.  Which basically and simply looks like this: </p>
  
  <pre><code>function confirm(i){
      var options = '&lt;br/&gt;&lt;br/&gt;&lt;input class="button1" value="Yes" type="button" onclick="return true"&gt; &lt;input class="button1" value="No" type="button" onclick="return false"&gt;';
      $('#text').html(i+options);
      $('#confirmDiv').fadeIn('fast');
  }
  </code></pre>
  
  <p>Obviously the return true / false didn't work, or else I wouldn't be asking!</p>
  
  <p>In another function i've got (So you get the picture):</p>
  
  <pre><code>    var con = confirm("Are you sure you'd like to remove this course?");
      if(!con){return;}
  </code></pre>
  
  <p>How can I get confirm to return the value directly?  I'd assume it's return {this.value} or so?</p>
  
  <p>Thanks!</p>