Log in

View Full Version : Where to add javascript that needs to be at the bottom of the html page


stevelack
07-04-2009, 08:16 PM
I have added a menu to my forum consisting of images for buttons in the header section of the common templates page. I am trying to get the buttons to work with a javascript rollover as they do in my main site. I placed the following code at the very bottom of the footer template:

<script src=
"domroll.js" type="text/javascript">

and copied the file domroll.js to the /forums directory. The script isn't executing.

Here's the page where it doesn't work:

http://www.satspeedprep.com/forums/

and the page where is does work:

http://www.satspeedprep.com

Any suggestions would be appreciated.

Thanks!

NJAquaman
07-05-2009, 12:46 PM
try the head tag under your style

style manger > your style > go > Headerinclude

place it in their , that where it belongs!

Dismounted
07-05-2009, 01:26 PM
Contrary to the above post - the header isn't the right place. The header is after the head section, and inside the body.

Either place it in headinclude, or the footer, like you have done. Try this code instead:
<script type="text/javascript" src="http://www.satspeedprep.com/domroll.js"></script>

stevelack
07-05-2009, 05:55 PM
Thank you so for much the code. It never dawned on me to use an absolute path to the js. It worked perfectly.