I have a button in a list page grid row that launches a backgrounjd job thru the server side of the ajax code.
The background job may run for 2 to 10 minutes.
I want the users browser page to keep querying the server every 10-15 seconds for process status to keep the page alive and update the waiting user.
How would I set this up?
A thought was to put a button on the page that is invisible and have some jquery invoke the button to get an ajax loop started. Each timed interval, the server would return a process status message and display in a sweetalert notice.
In statdard phpRunner, it seems you can only setup an ajax function by adding a button kind of mechanism; which gets you the code setup for the tri-part coding.
Or, how to I make the launch button 3rd state JS code, trigger the same Launch button again with messages to make it act like a status request instead of a launch request? Or perhaps use jquery to hide the launch button once it is pressed and then unhide a status button. The last thing the Launch button does is set a timer to invoke the status button over and over until the process completes?
I know I am just missing a basic part (of understanding) of this process so I can make this work.
Any Ideas?