
browser window size, set to a session variable?
<%
'this ASP writes a HTML file with Javascript built into it
'it then calls itself and passes the size back to itself
'Afterwards, it sets a session variable and then redirects to another page
pageName=Request.ServerVariables("Script_Name")
If Len(Request("size"))>0 Then
screenSize=Request("size")
session("screenSize")=screenSize
response.redirect "main.asp"
Else
Response.Write("<script>")
Response.Write(" var sz=screen.width+'x'+screen.height;")
Response.Write(" location = '"&pageName&"?size='+sz;")
Response.Write("</script>")
End If
%>
Quote:
> Hi All...
> I have an index.asp that plays a flash intro, sets some session variables,
> and then
> response.redirects to main.asp where the real website begins.
> I would like to detect the width of the browser window and assign it to an
> ASP Session Variable. That way, I can check it as each page loads and
make
> my page
> for each resolution instead of using percentages and other stuff.
> Any ideas on how to do this? I imagine it's straight forward, but I
cannot
> figure it out. :(
> -Lucy