Wasn`t sure which forum to use so I gambled on this one...
I want to see the screen resolution of our users say over just 1 month to gauge what most people are using and was going to send to DB or write to a simple file.
So I need to use clientside to grab the screen res and serverside to send to file. My problem is that when I try to write to file it displays my javascript instead of the output, i.e.
sends to the text file "<script>document.write(w+'x'+h);</script>"
but what I need is for example "800x600"
Is there a way to make asp and javascript work together?
I want to see the screen resolution of our users say over just 1 month to gauge what most people are using and was going to send to DB or write to a simple file.
So I need to use clientside to grab the screen res and serverside to send to file. My problem is that when I try to write to file it displays my javascript instead of the output, i.e.
Code:
<script>
var w = screen.width;
var h = screen.height;
document.write(w+'x'+h);
</script>
<%
MyFile = Server.MapPath("screenres.txt")
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Set TSO = FSO.OpenTextFile(MyFile, 2)
TSO.write "<script>document.write(w+'x'+h);</script>" & vbcrlf
TSO.close
Set TSO = Nothing
Set FSO = Nothing
%>
sends to the text file "<script>document.write(w+'x'+h);</script>"
but what I need is for example "800x600"
Is there a way to make asp and javascript work together?