K
Kevin Potter
We have an application that has been running on IIS4 and IIS5 for
quite some time, without problem We're now migrating to IIS6
(windows/2003), and have run into a what might? be a Javascipt
problem/question...
The snippet of code in question is:
<script language="JavaScript"><!--
document.write("<script src='/fp/"+includename+"'></script>");
// -->></script>
The included filename is a variable, and does not have a .js
extension. It points to a filename among several thousand files. The
included files ARE javascript files, and contain nothing but
javascript.
This code works fine in IIS4 and IIS5. But when moving to IIS6, the
<script> statement is ignored (because the includename does not end
with .js). If (as a test), I do add a .js on the end of the
includename in the script statement (and create a matching include.js
file), then things work fine.
Our problem is we cannot rename the thousands of files to .js
extensions (they are produced and used by other processes, and the
filename changes would mean more changes in these systems).
I've tried specifying the language, and the type, in the script
statement, but it does not make a difference:
<script language="JavaScript"><!--
document.write("<script language='JavaScript' type='text/javascript'
src='/fp/"+includename+"'></script>");
// -->></script>
It still ignores the <script> statement.
I realize this may be an IIS issue, but, maybe it is a Javascript
issue.
1. Can anyone clarify if the .js is REQUIRED on a <script ....>
include within document.write?
2. Can anyone suggest a different way to reference this included
javascript file, knowing the included filenames are already set, and
do not end in .js?
Thanks for your thoughts.
quite some time, without problem We're now migrating to IIS6
(windows/2003), and have run into a what might? be a Javascipt
problem/question...
The snippet of code in question is:
<script language="JavaScript"><!--
document.write("<script src='/fp/"+includename+"'></script>");
// -->></script>
The included filename is a variable, and does not have a .js
extension. It points to a filename among several thousand files. The
included files ARE javascript files, and contain nothing but
javascript.
This code works fine in IIS4 and IIS5. But when moving to IIS6, the
<script> statement is ignored (because the includename does not end
with .js). If (as a test), I do add a .js on the end of the
includename in the script statement (and create a matching include.js
file), then things work fine.
Our problem is we cannot rename the thousands of files to .js
extensions (they are produced and used by other processes, and the
filename changes would mean more changes in these systems).
I've tried specifying the language, and the type, in the script
statement, but it does not make a difference:
<script language="JavaScript"><!--
document.write("<script language='JavaScript' type='text/javascript'
src='/fp/"+includename+"'></script>");
// -->></script>
It still ignores the <script> statement.
I realize this may be an IIS issue, but, maybe it is a Javascript
issue.
1. Can anyone clarify if the .js is REQUIRED on a <script ....>
include within document.write?
2. Can anyone suggest a different way to reference this included
javascript file, knowing the included filenames are already set, and
do not end in .js?
Thanks for your thoughts.