PDA

View Full Version : Reference a js file in a template


pgowder
11-11-2002, 06:07 PM
How can I call a js file in a template?

Thanks!

Erwin
11-11-2002, 08:21 PM
The same way you do it in a normal HTML file.

<script language="Javascript" src="yourfilenamehere.js"></script>

Put the JS file in your forums directory.

filburt1
11-11-2002, 11:42 PM
Technically it should now be type="text/javascript" instead of language="Javascript" but the W3C never keeps a standard for more than six months anyway ;)

Erwin
11-12-2002, 12:36 AM
Use the one I posted - it's the same format that vB uses to call the vBCode external file vbcode.js, so it should work within vB.