Re: how to access javascipt variables in PHP
| From: | Chris Garaffa | Date: | Wed, 17 Jul 2002 21:33:36 +0000 |
| Subject: | Re: how to access javascipt variables in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-108189@lists.php.net to get a copy of this message | ||
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"] = "aquax@optonline.net";
$contact_info["Work"] = "cgaraffa@creativeaim.com";
$contact_info["cell"] = "203.803.9066";
"Seppo Laukkanen" (from <seppo.laukkanen@wintec.fi>) 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
>
>