tobert at gmail.com
Mon Oct 20 19:40:09 PDT 2008
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|
> var SW = screen.width;
> # $SWW = SW;
> If SW is equal to 1280, how do I get that 1280 into $SWW?
Just add a hidden input field to the form before submit in pre-ajax style:
// not tested, probably has errors ... not robust at all (for
instance, doesn't handle multiple forms in a page)
var windowSize = document.createElement("input");
windowSize.setAttribute("value", window.width + "x" + window.height);
Or something like that ...
> 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
More information about the San-Diego-pm