> Can someone tell me how we can assign the content of a PHP
> variable to a Java variables in a script (and vice versa).
PHP -> JavaScript is easy:
<?php
echo "\n<SCRIPT LANGUAGE=JavaScript>\n";
echo " document.foo = $foo;\n";
echo "\n</SCRIPT>\n";
?>
The other way around is a bit tougher...
You see, PHP runs on the server and spits out your web-page to your browser.
Then, the page is done, so the server/browser close the connection and
aren't really talking to each other.
Then, your JavaScript starts executing.
Now, if you want your JavaScript to interact with PHP, your JavaScript has
to open up a whole new connection to some other page, or the same page, but
it has to pass in any values and start over. It's a whole new run of a PHP
script either way, and makes for a rather slow web-site except in certain
specialized cases.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]