title: jQuery: Stall a forms default action
body: <p>I'm currently working with progress bars for form uploads using the PHP uploadprogress extension. I have followed a tutorial here and everything works as in the example: <a href="http://www.ultramegatech.com/blog/2010/10/create-an-upload-progress-bar-with-php-and-jquery/" rel="nofollow">http://www.ultramegatech.com/blog/2010/10/create-an-upload-progress-bar-with-php-and-jquery/</a></p>
  
  <p>However in the example the form targets an iframe. My PHP script that receives the call checks the data and makes sure its all valid etc, if its successful it redirects, and if it fails it reloads the page with error highlighting.</p>
  
  <p>Therefore... I was assuming if I took the...</p>
  
  <pre><code>target="upload-frame"
  </code></pre>
  
  <p>... away that the form would act as normal and do its thing, which it does.</p>
  
  <p>However now that there is no target or iframe (and i did remove this from the javascript too) the javascript function which loops to update the progress bar doesn't seem to get any data back from the getprogress() php function.</p>
  
  <p>I can manually access it and information is there.</p>
  
  <p>I assume that by default whilst form is being submitted that no other calls can be made on the page as the browser is effectively trying to redirect whilst waiting for files to upload. Does anyone know a way I can stall the redirect behaviour until file upload is complete?</p>