Home: Perl Programming Help: Intermediate:
Screen Resolution



crashinto
Novice

Aug 31, 2001, 5:53 AM


Views: 1332
Screen Resolution

How can you display the Screen resolution of the computer that access the cgi script? Does it have anything with $env?



mhx
Enthusiast / Moderator

Aug 31, 2001, 6:23 AM


Views: 1329
Re: Screen Resolution

No. I think there's a way to determine the screen resolution with JavaScript, but I don't know much about JavaScript programming. Perhaps you try reposting this in the JavaScript forum?

-- Marcus


Code
s$$ab21b8d15c3d97bd6317286d$;$"=547269736;split'i',join$,,map{chr(($*+= 
($">>=1)&1?-hex:hex)+0140)}/./g;$"=chr$";s;.;\u$&;for@_[0,2];print"@_,"



crashinto
Novice

Aug 31, 2001, 6:41 AM


Views: 1328
Re: Screen Resolution

But I need perl, I wanted to do something like:

if ($screen > /1024*768/) { Stuff.... }
else { Stuff... }



crashinto
Novice

Aug 31, 2001, 3:54 PM


Views: 1324
Re: Screen Resolution

Anyone know?



wickedxter
User

Aug 31, 2001, 4:47 PM


Views: 1323
Re: Screen Resolution

as mhx posted there is not possible way with perl, you might be able to make perl work with java script and then test it that way, but with just perl its self, nope.



crashinto
Novice

Aug 31, 2001, 5:09 PM


Views: 1321
Re: Screen Resolution

How do the counter stat scripts do it? They comine Javascript and Perl?