I've done alot of googling and searching on stackoverflow about this and can't quite figure this out.
I've got a PHP script that is run via a form button to reserve access to a computer in a lab environment. The PHP script runs some vendor-specific commands to generate a username and password with specific privileges. This process takes approximately 20 seconds, and redirects to another page after completion. During this process though, the page just sits there without informing the user about what is going on.
I'd like to implement a progress bar. That part's easy enough and documented in too many places to count, but the way I want it to work may be impossible. I want the progress bar to be created on the same page as the form button is and be able to exchange information between the progress bar and the script itself (change the progress bar from 25 to 50% for instance after the second of the 4 commands in the script are run.) Is this possible? If not, I'm open to suggestions.
I've experimented with dynamically generating an iframe via onclick which runs the script (and build the progress bar into the PHP script), but how to exchange form data with the script via iFrame and change the URL of the parent page seems to excape me. Any help or suggestions are appreciated.
Edit: I've already got a loading animation running during the process which lasts until the redirect, but my goal is to replace it with the progress bar in question since I can specify a % or even a message for where in the process it is if theres a problem.