I'm calling this from a hook but it's not working. Am I doing something wrong?
CRM_Core_Resources::singleton()->addScript("alert('hello');");
I confirmed that it's running by adding debug code to addScript.
CiviCRM Stack Exchange is a question and answer site for administrators and users of the CiviCRM Constituent Relationship Management software. It only takes a minute to sign up.
Sign up to join this communityI'm calling this from a hook but it's not working. Am I doing something wrong?
CRM_Core_Resources::singleton()->addScript("alert('hello');");
I confirmed that it's running by adding debug code to addScript.
The syntax you gave is correct. I suggest you:
exit();
in your code).