Back in v2020, I could add JavaScript code to a global PHP variable in any server-side event and just add this to a client-side startup script like this:
Code: Select all
<?php
global $javascript_to_run;
echo $javascript_to_run;
?>
In v2023, this is not possible, as it turns an error when generating: "Error: PHP code is not allowed in global Client or Startup Script."
How can I add JavaScript code that depends on conditions that are evaluated server-side, say in a Row_Rendering event?