RE: [PHP] Calling Javascript-function from php-script ...

From: Date: Tue, 19 Mar 2002 12:25:28 +0000
Subject: RE: [PHP] Calling Javascript-function from php-script ...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-89121@lists.php.net to get a copy of this message
Then you need to do it like this: <? if ($myVal == "---") { ?> <script language="JavaScript"> alert("DOH!"); </script> <? }; ?> But you can not make PHP call javascript functions directly. Niklas -----Original Message----- From: Marcel Besancon [mailto:mb@besancon-online.net] Sent: 19. maaliskuuta 2002 14:20 To: php-general@lists.php.net Subject: Re: [PHP] Calling Javascript-function from php-script ... Hi, i know that one is server-side and the other is client-side. But what i meant 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: > > Hi everybody, > > > > is there someone who can tell me how to call a > > javascript-function by a > > php-script. > > > > Thanks for each answer > > > > Marcel > > > > -- > > registered Fli4l-User #00000388 > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#89121) next »