title: Get the URL generated from a form on submit with JavaScript
body: <p>Is it possible to catch the URL generated from a form when firing its 'submit' event?</p>
  <p><strong>I know I can generate the URL from data</strong></p>
  <p><strong>I'm not talking about form's action URL</strong></p>
  <p>I mean the <code>?field=value&amp;other-input-name=value&amp; ...</code> part</p>
  <p>Scenario:</p>
  <p>We have a form and a JavaScript script which sends an Ajax request to a PHP script.</p>
  <p>I usually do like this:</p>
  <ul>
  <li>Register for the form's submit event</li>
  <li>Prevent the default behavior</li>
  <li>Construct a URL from data</li>
  <li>Open an HTTP request with the constructed URL</li>
  </ul>
  <p>Now, I was wondering, when firing 'submit' normally (on non-Ajax requests) the URL gets constructed by the form, which then uses that URL to send data to the PHP counterpart.</p>
  <p>How can I 'catch' that URL? There aren't any clues from the event itself which doesn't seem to store it, or at least I haven't been able to find it.</p>
  <p>It must be somewhere!</p>