Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Get visitor's screen size.

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


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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-23 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found