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\wwwr oot, and I placed my JavaScript code in a
file called updated.js under c:\Inetpub\wwwr oot\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\wwwr oot\scripts\upd ated.js--------------------------
update = new Date(document.l astModified)
theMonth = update.getMonth () + 1
theDate = update.getDate( )
theYear = update.getYear( )
document.writel n("<I>Last updated: " + theDate + "/" + theMonth + "/" +
theYear + "</I>")
----------c:\Inetpub\wwwr oot\scripts\upd ated.js--------------------------
---------c:\Inetpub\wwwr oot\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="NoteTa b Light 4.95">
<META name="author" content="Web Spinner">
<META name="descripti on" content="Test">
<META name="keywords" content="Test">
</HEAD>
<BODY bgcolor="#FFFFF F" text="#000000" link="#0000FF" vlink=
"#800080" alink="#FF0000" >
<SCRIPT language="JavaS cript" src="scripts/updated.js" type=
"text/javascript">
</SCRIPT>
</BODY>
</HTML>
---------c:\Inetpub\wwwr oot\x.asp---------------------------------
working with ASP. I placed my HTML code in a file called x.asp
under c:\Inetpub\wwwr oot, and I placed my JavaScript code in a
file called updated.js under c:\Inetpub\wwwr oot\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\wwwr oot\scripts\upd ated.js--------------------------
update = new Date(document.l astModified)
theMonth = update.getMonth () + 1
theDate = update.getDate( )
theYear = update.getYear( )
document.writel n("<I>Last updated: " + theDate + "/" + theMonth + "/" +
theYear + "</I>")
----------c:\Inetpub\wwwr oot\scripts\upd ated.js--------------------------
---------c:\Inetpub\wwwr oot\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="NoteTa b Light 4.95">
<META name="author" content="Web Spinner">
<META name="descripti on" content="Test">
<META name="keywords" content="Test">
</HEAD>
<BODY bgcolor="#FFFFF F" text="#000000" link="#0000FF" vlink=
"#800080" alink="#FF0000" >
<SCRIPT language="JavaS cript" src="scripts/updated.js" type=
"text/javascript">
</SCRIPT>
</BODY>
</HTML>
---------c:\Inetpub\wwwr oot\x.asp---------------------------------
Comment