Jon wrote:
> Hi,
>
> I'm writing a VERY BASIC stats databse for the default page of my web site.
> I'm detecting various stats and saving them:
>
> <%
> visitdate = date()
> visittime = time()
> visitbrowser = Request.ServerVariables("HTTP_USER_AGENT")
> visitreferer = Request.ServerVariables("HTTP_REFERER")
> ' code here for screen size
> ' code here to save to database
> %>
>
> I wish to also get screen resolution/size. I realise this is client side so
> I can use:
>
> <script language="JavaScript" type="text/javascript">
> <!--
> var screenW = screen.width
> var screenH = screen.height
> document.write(screenW + "x" + screenH)
> //-->
> </script>
> But I can't save that into my database!!
You can try
<script type="text/javascript">
document.write('<img alt="" src="log.asp?width='
+ screen.width
+ '&height=' + screen.height
+ '" width="0" height="0">');
</script>
then in log.asp you store those values from the query string.
--
Martin Honnen
http://JavaScript.FAQTs.com/