For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > November 2004 > Odgovori: Re: screen size...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Odgovori: Re: screen size...
lfurlan@siol.com

2004-11-05, 3:55 pm

Easier and shorter way:

<script type="text/javascript">

document.write("Screen resolution: " + screen.width + " X " + screen.height)

</script>

enjoy, Luka
========================================
====================
Od: Chasecr Systemhouse <chasecr.systemhouse@gmail.com>
Datum: 2004/11/05 Pet AM 02:27:46 CET
Za: Luinrandir Hernsen <luinrandir@luinrandir.com>, beginners-cgi@perl.org
Kp: jaxlug-list@jaxlug.org
Zadeva: Re: screen size...

On Thu, 4 Nov 2004 10:48:12 -0500, Luinrandir Hernsen
<luinrandir@luinrandir.com> wrote:
> It there a way to get the screen size info using perl?


As a CGI, not really. Try:

<blockquote><table border=3 bgcolor=#000000><tr><td>
<script>
toolkit = java . awt . Toolkit . getDefaultToolkit ();
screensize = toolkit . getScreenSize ();
document . writeln
(
"<p>" +
"You screen is " + screensize . width + " pixels wide." +
"</p>"
);
document . writeln
(
"<p>" +
"You screen is " + screensize . height + " pixels tall." +
"</p>"
);
</script>
</td></tr></table>
</blockquote>


HOWEVER, The remote client must have JS enabled and have Java installed =/

--
WC -Sx- Jones
http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: beginners-cgi-unsubscribe@perl.org
For additional commands, e-mail: beginners-cgi-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>


========================================
====================


=================================
Mirko tipka na radirko.
http://www.worldofspectrum.org/
=================================

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com