RE: PHP / JavaScript integration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mário Gamito <mailto:lists@xxxxxxxxxxx>
    on Tuesday, March 08, 2005 4:28 PM said:

> I'm trying to integrate some JavaScript functions in PHP, but so far,
> no good :(

[snip]

> Now... i want to call this JavaScript function from the regular PHP
> files. In particular, before the HTML code.
> Like this:

[snip]

> How can i do this ?
> How to tell PHP, that def(word) is a JS function in js.php file ?
> I've tried include ('js.php'), etc., but got no results :(

You don't and you can't. PHP does not interact with the client (like you are thinking it does) and Javascript does not interact with the server. They are completely different and not related, except that PHP can send Javascript to the client for the client to interpret.

It's a bit confusing at first but once you understand it, you'll wonder why it ever didn't make sense.



Chris.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux