views:

55

answers:

4

using this code:

<script src="<?php bloginfo('template_url'); ?>/scripts/hovermenus.js" type="text/javascript"></script>

to load this script

firebug is not showing this script as loaded, however, these scripts:

<script src="<?php bloginfo('template_url'); ?>/scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="<?php bloginfo('template_url'); ?>/scripts/salf_ui.js" type="text/javascript"></script>
    <script src="<?php bloginfo('template_url'); ?>/scripts/date.js" type="text/javascript"></script>
    <script src="<?php bloginfo('template_url'); ?>/scripts/datePicker.js" type="text/javascript"></script>

all load perfectly well. I have double, triple and quadruple checked the file is in the right directory.

A: 

charset isnt a valid attribute for the script tag, try removing it

EDIT

Actually it is valid, try removing it anyway :)

Rocket Ronnie
Yes, it is: http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.1
David Dorward
A: 

Make sure you've closed all your script tags above the one you're trying to load.

Hooray Im Helping
checked, nothing!!
Mild Fuzz
+1  A: 

Looks like the problem is with your file

Make sure the file .../scripts/hovermenus.js exists. Navigate there and copy paste the file name from there.

Could the script be in another directory? could it be hoverMenus.js or hover.menus.js.... etc.

If none of this works, try copying and renaming the file. See if you can load the renamed version. If you can't, it's something in the file.

Unrelated: You should declare your variables with var so you don't create a bunch of global variables attached to window.

Peter Ajtai