actually it was my mistake! the version is 2.4.0 RC in which i'm writing this module.
I guess i should just echo the script for the module to be compatible with 2.3..
but i would also like to know how this could be done in 2.4 and why the $xoTheme didnt work.
It does not change anything to call it from the head or from the "bottom".
Yahoo even advice to call JS scripts in the bottom of the pages ...
@hervet : mate i just want the code to be tidy. If i echo the script then it will be echoed somewhere between the body tags and not in the head or the bottom. Thats why i'm asking this. I know its not important, its what i've done so far to make the code work. I was just wondering how this could be done differently.
Thanks for your answers and the help guys. Have a nice one.