Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 scrutinizing the Monastery: (7)
As of 2025-03-27 16:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (70 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.