AnsweredAssumed Answered

JSON error during after_ui_frame hook in email module. v6.5

Question asked by Rodolfo Tuble on Aug 5, 2016

I am executing a script inside my after_ui_frame hook for the email module. Since I want this script to be executed after the page is loaded. As I do now know how to add a new javascript inside the email module.


This is my function:


function after_ui_frame_method($event, $arguments)
echo '<script>


Error I get: VM123572:1 Uncaught SyntaxError: Unexpected token < in JSON at position 147






The script that I echoed inside the hook is appended to a JSON, which then causes this problem.