I want to call a JavaScript function through PHP and store the returned value in a PHP variable. How to do this?
views:
65answers:
1
+1
A:
You can't do that - javascript being a client side technology will execute after your PHP script has already finished so there's no way to do what you are looking to accomplish.
Marek Karbarz
2009-10-31 06:11:18
you can do that - for an example, see http://stackoverflow.com/questions/419240/how-to-get-javascript-function-data-into-php-variable
ax
2009-10-31 07:07:42
technically you're not calling a javascript function from PHP, you're just using AJAX to get a PHP page - so it's going javascript -> PHP not PHP -> javascript
Marek Karbarz
2009-10-31 07:14:23