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:[EMAIL PROTECTED]] 
Sent: 19. maaliskuuta 2002 14:20
To: [EMAIL PROTECTED]
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" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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


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

Reply via email to