I do do this, but I was wondering is there is another way?
I have some large scripts I only want loaded on some pages and do not want to have them load on all pages. I also don't want to do override temples just to add a new script to be included on those pages.
Any other suggestions?
I was hopeing somehow in the module at runtime I could add it to the ezini JavaScriptList without haveing to put it in the ini file.
Another way could be (eg. when you want it in the content views) to include a template in the pagelayout and make overrides for the pages/views where you want to have it. So you can use the flexible override system.
There may be also other ways those are the first i have in mind.
This will include a javascript based on the uri of request.
If you are making your own module (otherwise ignore this), its probably better to set $Result["javascript"]="myjs.js" in the end of the PHP code for the module, and then in the pagelayout use: