Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6231179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:53:08+00:00 2026-05-24T09:53:08+00:00

I’m currently working with progress bars for form uploads using the PHP uploadprogress extension.

  • 0

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: http://www.ultramegatech.com/blog/2010/10/create-an-upload-progress-bar-with-php-and-jquery/

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.

Therefore… I was assuming if I took the…

target="upload-frame"

… away that the form would act as normal and do its thing, which it does.

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.

I can manually access it and information is there.

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:53:09+00:00Added an answer on May 24, 2026 at 9:53 am

    The solution I have found is to continue using the iframe as a target for the form. Then when the upload completes I run a few checks on the iframe’s content.

    First with jQuery I check the content of the #upload-frame to see if it contains either the redirect page or the same page with errors, like this:

    $('#upload-frame').contents().find('.errors').size();
    

    If the errors size is greater than 0 then I know a problem occurred and this needs to be shown to the user. So I do the following body replacement:

    var html = $('#upload-frame').contents().find('body').html();
    $('body').html(html);
    

    If there are no errors I simply do a redirect to the intended page like so:

    window.location = "finished.php";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I am using Paperclip to handle profile photo uploads in my app. They upload
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.