What Richard meant was: /// FILE.PHP /// <?php $var = 123; if ($var > 100){ ?> <script language="JavaScript"> alert('Bigger than 100'); </script> <?php } ?> /// EOF /// That way you can conditionally send some JS to client, but running actual JS in PHP is not possible. (Not sure about Jscript [script runat=server] tho, I believe it only runs on IIS) Atenciosamente, www.softpartech.com.br Thiago Henrique Pojda Desenvolvimento Web +55 41 3033-7676 thiago.pojda@xxxxxxxxxxxxxxxxxx Excelência em Softwares Financeiros -----Mensagem original----- De: Richard Heyes [mailto:richardh@xxxxxxxxxxx] Enviada em: terça-feira, 20 de maio de 2008 06:53 Para: Shelley Cc: PHP General list Assunto: Re: Help Call Javascript Methods Inside PHP Shelley wrote: > Hi all, > > How can I call a javascript method inside PHP? > That is: > Suppose there is a js file: http://someurl/somejs.js > There are some js methods in that js file, > I want to include that js into PHP and call its methods. > > Is it possible? No. What you can do though is use PHP to send some HTML to the browser which calls Javascript methods. -- Richard Heyes In Cambridge? Employ me http://www.phpguru.org/cv +----------------------------------------+ | Access SSH with a Windows mapped drive | | http://www.phpguru.org/sftpdrive | +----------------------------------------+ -- 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