|
I think your problem is that you're expecting to intermingle JavaScript and PHP. You just can't do that, as chrishirst pointed out. PHP is a server side language that is interpreted before the page is ever sent to the browser.
JavaScript, on the other hand, is a client-side language that processes things within the confines of the current environment, usually a browser. If you need some PHP processing to happen, you can dynamically post values to a PHP page from a JavaScript function. That may be what you want to look into. Just do a google search for AJAX.
__________________
Plugin-Developer.com - Custom plugin development to fit your needs. Plugins available for WordPress and Drupal, among others.
|