title: Two functions in onclick - Ajax call in second (cross browser)
body: <p>I have </p>
  
  <pre><code>&lt;a href="url" onclick="var msg = confirm('Confirm?'); submit(msg, event);"&gt;Click me&lt;/a&gt;
  </code></pre>
  
  <p>What I want to do is take the confirmation box result (true/false), pass it to the submit button, and then kill the href call if its false.</p>
  
  <p>I have it working in my development environment, but when I load this into a cross browser scenario, the second call isn't working:</p>
  
  <pre><code>function submit(msg, evt) {
  
       if(msg == true) {
           $.ajax({
               type:"POST",
               data:{answer:'Correct'},
               url:'https://myurl/p'
            });
       }
       else { evt.preventDefault(); return false; }
  }
  </code></pre>
  
  <p>The URL passed is just the URL and has no data to it (in production). This exact code works perfectly fine in my environment, but in the cross browser scenario it fails. If I remove the confirmation box, everything works perfectly.</p>
  
  <p>I have a feeling it's tied to the preventDefault call on the cancel of the confirmation box. Would that preventDefault disable the next call out with that same link?</p>