Posted by J.O. Aho on 03/09/07 07:42
kick ass wrote:
> Does anyone knows how to "copy" content of variable from java script to PHP
> variable.
> For example:
>
> JAVASCRIPT:
JavaScript isn't Java, the only thing they have in common is the four first
letters in their names.
> <SCRIPT>
> ...if (something...blabla)
> {
> name="JACK";
> }
> </SCRIPT>
>
> Now I want to copy "JACK" into PHP variable $name.
> Can I do that?
You can't do that without reloading the whole script.
As shimmyshack points out there are a couple of different methods to do it,
AJAX is good if you only have to update a smaller area of your page, a form is
easy to make and quite good when updating the whole page.
--
//Aho
[Back to original message]
|