vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Where to add javascript that needs to be at the bottom of the html page (https://vborg.vbsupport.ru/showthread.php?t=217846)

stevelack 07-04-2009 08:16 PM

Where to add javascript that needs to be at the bottom of the html page
 
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:
HTML Code:

<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.


All times are GMT. The time now is 01:00 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01327 seconds
  • Memory Usage 1,714KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete