I don't think you have given us enough information, perhaps you have though. You have a mismatch between the tag used:
Code:
<SCRIPT LANGUAGE="JavaScript" SRC="js.html">
</SCRIPT>
and acceptable attributes for it in modern browsers, as well as a problem in that, even if the page js.html were to be evaluated as an HTML page with javascript on it (which might not even be possible), the result might not be as expected.
For the first part, the correct attribute to use with a script tag is ordinarily:
Code:
<script type="text/javascript" src="whatever.whatever"></script>
Due to server configuration there may be limits on what that second 'whatever' can be, it would have to be a file type that can be served as text/javascript on that server.
Now you might be able to get away with:
Code:
<script type="text/javascript" src="js.html"></script>
or:
Code:
<script type="text/html" src="js.html"></script>
But I doubt it. A lot would depend upon the server and upon just exactly what is in the js.html file. Also, browsers might be inconsistent in how they would view either approach.
However, say you are using PHP to create the external script file, if once created, it is valid javascript and the external file has the .php extension, you could do:
Code:
<script type="text/javascript" src="js.php"></script>
Similarly, if using asp to create the file, just use the .asp extension.
If it is all just strictly workable javascript in the external file, rename it to js.js and use:
Code:
<script type="text/javascript" src="js.js"></script>
If you want more help, please tell us how this external (script) file is created, and:
Please post a link to the page on your site that contains the problematic code so we can check it out.
Bookmarks