Re: Calling Javascript-function from php-script ...
| From: | scott furt | Date: | Tue, 19 Mar 2002 12:25:46 +0000 |
| Subject: | Re: Calling Javascript-function from php-script ... | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89122@lists.php.net to get a copy of this message | ||
PHP cannot call a javascript function.
but PHP can examine the incoming variables
and then output Javascript to the browser
to do the appropriate work.
for example, calling $text.php?this=5
pops up an alert saying "this=5"
test.php
<?
print "<script>\n".
"alert('this='+". $this .");\n".
"</script>"
?>
Marcel Besancon wrote:
Hi,i know that one is server-side and the other is client-side. But what imeant ist the following. I have a script with a form. By submitting this form and checking out some values php should call a javascript-function (such as an alert). You see the php-script shall call the javascript-function by "refreshing" the whole page. Bye, Marcel -- registered Fli4l-User #00000388 "Scott Furt" <lists@furt.com> schrieb im Newsbeitrag news:3C972AA7.6000608@furt.com...Short answer: no. Long answer: have the PHP script output javascript code to the browser. PHP = server-side Javascript = client-side Marcel Besancon wrote:by aHi everybody, is there someone who can tell me how to call a javascript-functionphp-script. Thanks for each answer Marcel -- registered Fli4l-User #00000388