browser window size, set to a session variable? 
Author Message
 browser window size, set to a session variable?

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



Thu, 14 Apr 2005 14:38:12 GMT  
 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



Thu, 14 Apr 2005 20:59:04 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. browser window size, set to a session variable?

2. A question

3. Interbase: referenetial integrity; by constraints or by triggers?

4. setting textbox size based on browser window size

5. In Browser Control Session variable does not get carried over to another window

6. Problem with SESSION VARIABLES using netscape when opening a new instance of the browser

7. Long time closing table components

8. How to connect progress bar to addindex method

9. Download Invitation for all coders and non-coders

10. BP7.0

11. ******************Mouse cursor**********************

12. Intrabuilder anyone ?....

 

 
Powered by phpBB® Forum Software