Im trying to mix some ASP inside of some javascript with no luck. I was wondering if the 2 languages dont work together..Heres my code...
<SCRIPT LANGUAGE="JavaScript">
function load() {
<%
on error resume next
set fso = createobject("scripting.filesystemobject")
set act = fso.opentextfile(server.mappath("active.txt"))
active = clng(act.readline)
active = active + 1
act.close
Set act = fso.CreateTextFile(server.mappath("active.txt"),true)
act.WriteLine(active)
act.Close
%>
}
function unload() {
<%
on error resume next
set fso = createobject("scripting.filesystemobject")
set act = fso.opentextfile(server.mappath("active.txt"))
active = clng(act.readline)
active = active - 1
act.close
Set act = fso.CreateTextFile(server.mappath("active.txt"),true)
act.WriteLine(active)
act.Close
%>
}
</SCRIPT>
<BODY onLoad="load()" onunload="unload()">
basically Im just writing to a text file when they come or go. Pulling all sorts of errors, I know the code inside the {} works. Any suggestions??






Stephan
Bookmarks