why would my javascript file not be loading?

Firebug will not show a javascript file as loaded if the file will not run due to invalidation. Fix JS, fix problem.


Ensure that the file actually exists. If you "view source", from the browser, you can hilite then right-click and copy the URL of the script. Go back to the browser, open a new tab, and right-click->paste the URL into the address bar, press enter. Does the script load in the browser window? If not, check the capitalization and spelling.

You script tag looks correct, so check your underlying assumptions.

EDIT

OK, since the file exists, let's determine why it isn't loading. You mentioned having Firebug, open that and switch to the 'Net' panel. You should see a GET for the script in question, along with its status. Is the status 200? Click that row and check the headers, as well as the Response tab within the expanded row. What do you see there?

Can you provide an example URL where this is occurring?

Tags:

Javascript