one method that i have found works for me (albeit not
so pretty, neat, or concise) is to pass js variables
through a url request. Ok follow me for a little if
you will (it's bulky, but it works!)

1) user loads a page (e.g.
your-domain.com/index.phtml)
that page contains the javascript which determines the
user's browser width and height. 
2) the page automatically refreshes immediately to
another page along with the variables (e.g.
/index2.phtml?h=xyz&w=abc).
3) on the new page, php can use the variables passed
via the URL as if it were posted with the GET method
from a form.

ok, i admit it's messy, not ideal, and lame, but it
works.

Since I don't know a fraction of what the php gurus
here know, the programming on my site may be messy,
bulky, and more complicated than it needs to be- but
at least it gets the job done : )

hope it helps




I can't think of a way to do it in the page itself...
Unfortunately 
(there
could be a way, I just can't think of it - frazzled
after a day of 
work),
but if you're using forms on your page, then set the
values of some 
hidden
form elements to the JS variables you want to use, and
pass them along. 
You
could have the page refresh itself to give you the
variables, too.
I'm sure there's a better way, though.
Good luck,
-- 
Chris Garaffa
#!/usr/local/lib/php
$contact_info["Name"]   = "Chris Garaffa";
$contact_info["Email"]  = "[EMAIL PROTECTED]";
$contact_info["Work"]   = "[EMAIL PROTECTED]";
$contact_info["cell"]   = "203.803.9066";


"Seppo Laukkanen" (from <[EMAIL PROTECTED]>)
wrote on 7/17/02 
3:06
PM:

> Can anybody help?
> > I have javascript code to find out browsers width
and height, but 
they
> are stored in javascript variables. How can I access
them from PHP? 
Or
> is there a method to do same in PHP straightly?
> > Thanks,
> Seppo
> > -- 



__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to