I am running Windows 2000 and I can't seem to get my JavaScript
working with ASP. I placed my HTML code in a file called x.asp
under c:\Inetpub\wwwroot, and I placed my JavaScript code in a
file called updated.js under c:\Inetpub\wwwroot\scripts.
When I rename x.asp to x.htm and execute it as a html file,
the JavaScript code works, however when it's x.asp and I
execute it by typing in the browser http://localhost/x.asp,
it doesn't work!
I know the example doesn't actually have any asp code in it,
but even when it does, my JavaScript does not work.
I've looked around, but can't seem to find information on how
to fix this. Can anyone help me out?
----------c:\Inetpub\wwwroot\scripts\updated.js--------------------------
update = new Date(document.lastModified)
theMonth = update.getMonth() + 1
theDate = update.getDate()
theYear = update.getYear()
document.writeln("<I>Last updated: " + theDate + "/" + theMonth + "/" +
theYear + "</I>")
----------c:\Inetpub\wwwroot\scripts\updated.js--------------------------
---------c:\Inetpub\wwwroot\x.asp---------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Test</TITLE>
<LINK rev="made" href="">
<META name="generator" content="NoteTab Light 4.95">
<META name="author" content="Web Spinner">
<META name="description" content="Test">
<META name="keywords" content="Test">
</HEAD>
<BODY bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink=
"#800080" alink="#FF0000">
<SCRIPT language="JavaScript" src="scripts/updated.js" type=
"text/javascript">
</SCRIPT>
</BODY>
</HTML>
---------c:\Inetpub\wwwroot\x.asp---------------------------------