Jump to content

Chrome Does Not Recognize A Js File


jimfog

Recommended Posts

The problem(as the title suggests) is that Chrome does not recognize a js file. Firefox has no problem. This is the code:

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

Unfortunately it is not a live site so you can see for yourself and judge better. In theory, what would be the reason Chrome might not "read" js code. The code listed above is in the HEAD section.Here is the whole code contained in the HEAD:

<head>	    <title>test test </title>	    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />		<link rel="stylesheet"  href="css/general.css"/>	    <script  type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" ></script>	    <script type="text/javascript" src="js/js-code.js"></script>    </head>

And another thing, the code does not work also in IE.

Link to comment
Share on other sites

well, you're problem is extremely vague, especially since you didn't provide the contents of the file in question itself or say specifically what is leading you to believe it is not being recognized. Basic debugging you should be doing:* Are you checking for errors?* Have you verified the path to the file is correct? That from the folder of the HTML file calling it, it is located in a folder call js?* did you make sure there are no <script> tags in the external js file?

Link to comment
Share on other sites

I fixed it- finally.I had made the mistake to place a meta-httpequiv line in the js file

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...