[San-Diego-pm] Question

Mark Schoonover mark.schoonover at gmail.com
Mon Oct 20 19:38:55 PDT 2008


Well, you could call another URL with the screen.width as part of the URL.
Something like:

http://server/screen.pl?screen=screen.width

You'd call this URL within javascript with document.location.href. Then you
could use CGI.pm to take that screen value, and it'll all be within Perl.

Kind of a hack, I wouldn't want to do it for a bunch of javascript vars,
that's for sure.

Mark Schoonover
http://www.linkedin.com/in/markschoonover
Cell: 619-368-0099 :: Fax: 619-374-3130 :: AIM: mschoonov



On Mon, Oct 20, 2008 at 7:26 PM, Joel Fentin <joel at fentin.com> wrote:

> The following is within a perl program on the server. My goal is to know
> the width of the surfer's screen so that I can make adjustments.
>
> my ($SWW);
> print qq|
> <script language="JavaScript">
>  var SW = screen.width;
> alert(SW);
> </script>|;
>
> # $SWW = SW;
>
> ===========================
>
> How do you get the javascript value into a perl variable?
>
> If SW is equal to 1280, how do I get that 1280 into $SWW?
>
> --
> Joel Fentin       tel: 760-749-8863
> Email:            http://fentin.com/me/ContactMe.html
> Biz Website:      http://fentin.com
> Personal Website: http://fentin.com/me
> _______________________________________________
> San-Diego-pm mailing list
> San-Diego-pm at pm.org
> http://mail.pm.org/mailman/listinfo/san-diego-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/san-diego-pm/attachments/20081020/34a10f0a/attachment.html>


More information about the San-Diego-pm mailing list