Adding a javascript immediate after body tag
Posted
by prabdrup
on Stack Overflow
See other posts from Stack Overflow
or by prabdrup
Published on 2010-05-31T11:20:53Z
Indexed on
2010/05/31
11:22 UTC
Read the original article
Hit count: 181
drupal
I am making a drupal module. My requirement in the module is that when the module is activated then it needs to add a javascript in page.tpl file just after the body tag. Can anyone help me how to do this. I have tried using drupal_add_js but it will not exactly put the script after body tag, rather puts inside the head or below in footer. I also tried using template variable and preprocess method but the problem is the preprocess method replaces the old value of that variable with the new one. Is there a way how i can implement this in.
© Stack Overflow or respective owner