|
|
ChatGPT 1/9/2026 |
|
PHPRunner does provide some capabilities for working with AJAX, but it may not offer the full flexibility you’re looking for when it comes to custom AJAX requests for a chat or messaging feature. However, there are ways to implement AJAX functionality within PHPRunner that can help you achieve your goals. Here are some suggestions:
ConclusionWhile PHPRunner does not provide a direct way to send arbitrary AJAX requests natively, you can achieve your functionality by using custom JavaScript with AJAX calls. This approach allows you to manage your messaging feature efficiently without cluttering your interface with too many buttons. Remember to handle responses appropriately and update your UI as needed to reflect changes in real-time. |
|
|
C
|
Chris Whitehead author 1/9/2026 |
|
Thank you Chatty, I have functions which do something similar, I was just wondering if there's any native PHPrunner functions . For example like accessing the server event of any button on the page from a JS driven event. say something like this (I asked ChatGPT). Runner.runButton(and in response. $params = $this->getParams(); |
|
|
|
Sergey Kornilov admin 1/9/2026 |
|
I don't think with any API for this as "accessing a server part of a button" is not a common request. While you can mimic what PHPRunner does when the button is clicked, it will be much easier to do your own thing. |
|
|
C
|
Chris Whitehead author 1/10/2026 |
|
Cheers Sergey, It was just me thinking and wondered if there's any native PHPRunner methods I can use within a Runner.displayPopup to send ajax data to the server event or other server events within other button.. |
|
|
|
Sergey Kornilov admin 1/10/2026 |
|
I guess you need to rethinkg your approach. I understand that it is convenient to think about buttons as functions but this would be a poor application design. Buttons and other server side events run in a certain context, have specific parameters etc, If you need to reuse a piece of code - you need to create a function and call it from both button's code and from your own AJAX request. |
|