Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Keep It Simple, Stupid
 
PerlMonks  

Re: Get visitor's screen size.

by amphiplex (Monk)
on Jul 14, 2002 at 09:24 UTC ( [id://181572]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Get visitor's screen size.

Hi !

In order to pass the screens height and width via hidden form parameters, you could insert something like this into your html:
<script TYPE="text/javascript" LANGUAGE="JavaScript"> function fill_in_screensize() { document.forms['main_form'].width.value=screen.width; document.forms['main_form'].height.value=screen.height; return true; } </script> .... .... <form name=main_form> <input type=hidden name=width> <input type=hidden name=height> <input type=submit onClick='fill_in_screensize();'> </form>
I don't know much javascript myself, so please don't rely on the code working on all browsers.

---- amphiplex

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://181572]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.