Adding a javascript immediate after body tag
- by prabdrup
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.