Discussion Locked

Getting users Screen Resolution

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I've been looking for the past week for a way to find out when someone comes to my web page what their screen resolution is, etc. in CGI/Perl.
What I think is needed is to run a Java script, then pass that variable to CGI/Perl.
Can some please email me some simple code that will show me how to do this?
Here is my URL: http://linux-serv.mendocino.cc.ca.us/~thammack/ Click on "Final Project"

4 replies

by esadacca

This script will get you the user's screen resolution. The first line is IE only; the second works in both IE and Netscape.

by fgarber

The following works fine.

You can use the variables width and height to set the size of fonts, the screen available height and width or anything else you want to control according to their screen size.

This discussion is closed to new replies.