Stop an anchor from loading on javascript confirm
<p>I was under the impression that this was formed correctly, but here it is forwarding to the anchor href (clicking through? what should I call this?) whether or not the user selects cancel or okay.</p>

<pre><code>&lt;script type="text/javascript"&gt;
function myconfirm(my_string)                                                 
{                       
 var agree = confirm('Are you sure you want to remove ' + my_string + '?');
 if(agree)                                                                       
 {                                                                               
  return true;                                                            
 }       
 else                                                                            
 {                                                                               
  return false;
 }
}                                                                                       
&lt;/script&gt; 
</code></pre>

<p>and the anchor</p>

<pre><code>&lt;a href="example.com/?remove=yes" onclick="myconfirm('my_string')"&gt;My String&lt;/a&gt; 
</code></pre>
