title: prevent event on symfony submitted form
body: <p>I want that user check the input data's form in a confim dialog after submit. So I write this:</p>
  
  <pre><code>$('form[name="my_form"]').submit(function(event) {
      event.preventDefault();
      var href = $(this).href;
  
      confirm("are you sure?", function () {
          window.location = href;
      });
  });
  </code></pre>
  
  <p>but if I choose OK on confirm the browser redirect to undefined. Where I'm wrong?</p>