Re: call php with javascript
| From: | Roko Roic | Date: | Tue, 27 Nov 2001 11:52:05 +0000 |
| Subject: | Re: call php with javascript | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-75769@lists.php.net to get a copy of this message | ||
> i have test.php:
> <?
> echo "test";
> ?>
>
> to call this in the html, i use
> <SCRIPT LANGUAGE="Javascript" SRC="test.php"></script>
>
> this works fine for IE, but is there an alternative for Netscape to do
this?
PHP is a server side programming language and it does not execute in the
browser.
What you are doing here is including php code fragment and telling the
broswer it is Javascript.
IE is forgiving about "<%" and ignores it, but Netscape throws a Javascript
error (as it should).
Once again, PHP is executed on the server side.
http://www.php.net
Roko