title: This Ajax works with debugging (Firebug), but not without it
body: <p>When I debug is code in Firebug, it works fine - it inserts records in my database and redirects to a URL. But it doesn't work. It gives me an error, <code>alert('error')</code>, when I don't use a debugger. Why? <code>val</code> is a serialized array,   </p>
  
  <pre><code>$('#target').submit(function() {
      if (validation == true) {
          $.ajax({
              type: "POST",
              url: "some url",
              dataType: "jsonp",
              data: val,
              success: function(data, textStatus) {
                  alert('success');
              },
              error: function(data) {
                  alert("error");
              }
          });
      }
      else {
          return false;
      }
  });​
  
  //PHP Code
  $return['url']= "/index.php?action=jobSeeker/jobSeekerRegistrationConfirmation";
  echo $_GET['callback']."(".json_encode($return).");";
  </code></pre>