Handle Long Processes in PHPRunner

Опубликовано: 25 Июль 2026
на канале: PHP Runner Tips And Tricks
129
5

Download this project: https://www.phprconsultant.co.za/howt...
Contact Me: https://phprconsultant.co.za/howto/co...

Are your users spamming buttons while waiting for long background processes to finish? In this tutorial, we dive into PHPRunner 11.3 to show you exactly how to lock down custom buttons and prevent duplicate actions.

Learn step-by-step how to manage long-running processes using custom buttons in PHPRunner. We start by examining the default behavior and why leaving buttons active during 10-second server tasks frustrates users. From there, we manually write the JavaScript for the Client Before and Client After events to disable and re-enable buttons using ajax.setDisabled() and ajax.setEnabled().

We also explore how to integrate SweetAlert popups using Google Gemini AI, ensuring your users get clear visual feedback when a process completes. Finally, we tackle the trickier scenario of handling long processes within the PHPRunner Dialog API. Since standard methods fail here, we build a custom window.isBusy lock and use ajax.submit()—a critical method used to manually pass control to the Server event after an asynchronous task concludes.

[Call to Action]
If you found this tutorial helpful, be sure to hit that LIKE button and SUBSCRIBE for more PHPRunner development tips! Want instant access to the source code and project templates used in this video? Check out the link below to become a channel sponsor and download this entire project file.

Download this project: https://www.phprconsultant.co.za/howt...
Contact Me: https://phprconsultant.co.za/howto/co...