Popup window called from php and then sequence events

From within one php script, I call another via javascript as a popup window that I want to display a loader graphic while a file is sent (server-side) out its serial port to a local (to the server) piece of hardware. I want the graphic to be displayed to the user while the file loads and then have it replaced with an “Upload Done” message, at which point the user closes the pop up.

From what I’ve been able to figure out, I probably need to use AJAX in order to accomplish this as I notice the popup remains blank until the upload is finished.

Yes, you would need to use AJAX to pull in the other PHP code and handle the upload.
Normally, you would place an image on it that is a rotating or other animated GIF that shows the file is being
uploaded. Once completed, you can for that to be changed out. Here is one way to handle it:
http://www.johnboy.com/blog/a-useful-php-file-upload-progress-meter
As you see from the sample display image, it pops-up a nice simple display which goes away once it is done.
You could alter it to fit your uses, but, simple is the best…

Sponsor our Newsletter | Privacy Policy | Terms of Service