Entry
Can I call a PHP function from Javascript?
Mar 15th, 2008 18:18
ha mo, logu logu, Louis Brown, Chris Pelling,
Javascript is client side, so it runs on the browser,
PHP is server side, so simply put, produces plain html to the browser,
not its functions. So the short answer is no!.
The only theoretical way that this could be done (as far as i know),
is if your javascript spawns a pop up, which could be used to run PHP
code and return the result you are after.
Then use the Javascript "window.opener. " commands to assign the
result from the popup code back to the original Javascript function.
It would work, but it seems a bit of a hash.
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com