I'm new here so I'm not sure what protocol to follow to explain 1) how to receive notifications from CiviCRM for the events shown in your screenshot of the CiviCRM Admin panel and 2) what you mean when, in terms of code, when you ask if there is a 'neat' way. In both Drupal, and by extension, CiviCRM there is More Than One Way to Do It.
Next, it's not clear from your questions whether you are looking for a "client-side" way to steer the page events to a handler you have written or you are trying to do something on the server side of things. I presume you already know how to capture and steer page events on the client side from jQuery.
Be advised, if you follow the link in your question, it states very clearly that "Normally, (aka nothing) on the server side needs to be done... to make a standard CiviCRM quickform/smarty page work with these helpers."
And the page continues to read as follows: " If the client-side script requires more information, simply add to $this->ajaxReponse(array (automatically available to all classes that extend CRM_Core_Page or CRM_Core_Form). "
That said, the best way anyone can really help you is to know what you are attempting to do that is not explained on that web page.
Could you please write back and tell everyone what you are attempting to do and we can try to help you with a specific answer?
A bit more of a reply to your question
I dug a bit deeper into the links in your posted question. While I think I understand a bit better what you are asking, here is a summary of what I understand which you can reply as being "correct" or not.
- You want to capture the page change event (personal contributions
campaign page) for the object highlighted in green
- You want to add a client-side event handler to the CiviCRM page
generated element for the green highlighted event.
- Your client-side event handler want to know which "selector" on the
personal contributions campaign page it should use to attach the
event handler to.
Is that the answer you are looking for?
As a start on finding the right selector to hook your "onChange" event to, I suggest you:
- Open the page in your Chrome web browser.
- Open Dev Tools once you have the Personal Contribution page open in the browser
- Position your cursor (Hover) on the page element in the PCC page Look at the
Dev Tools panel and it should display the HTML selector for that