I want to add a javascript to the element which contains the comment (question,answer) text from event module like this:
function process_event($event, $userid, $handle, $cookieid, $params) {
if($event == 'c_post'){
$this->output('<script>
//javascript code here:
var Dom = document.getElementById("id of this element");
...
</script>')
}
}
But this doesn't work. What kind of plugin should be used for this purpose? I don't know how to get the id of the element in a layer module.