1
phatjew
adding javascript for a module
  • 2003/11/25 20:10

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


I know that this topic's title seems to imply it is in the wrong forum, but you'll see why it is here.


I have a bunch of javascript in a module that I am writing, and I found the most convenient place to put it is in xoops.js, since that is loaded with every page already. That makes it a core hack.

Is this frowned upon? If so, where is the standard place to put a module's javascript?

Thanks for any advice.

2
hsalazar
Re: adding javascript for a module
  • 2003/12/15 3:26

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


phatjew:

I don't know if anyone frowns upon things that work (lol), but what I've seen is that modules employing its own javascript put in in the module's home directory.

Cheers.

3
wjue
Re: adding javascript for a module
  • 2003/12/15 11:53

  • wjue

  • Quite a regular

  • Posts: 315

  • Since: 2002/8/3 7


a more efficient way will be to place your js code in $xoops_module_header SMARTY variable, it is then charged only when the module is loaded.


wjue

Login

Who's Online

329 user(s) are online (231 user(s) are browsing Support Forums)


Members: 0


Guests: 329


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits