Re: Help Call Javascript Methods Inside PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You missed what I meant.

Suppose there is a piece of code like:
<script language-"javascript">
function hello() {
    document.write "hello";
}
</script>

I want to call that method inside PHP:
<?php
$c = hello();
echo $c;
?>

Hope you get it.


On Tue, May 20, 2008 at 5:40 PM, Chetan Rane <chetan_rane@xxxxxxxxxxxxxxxx>
wrote:

> Yea
>
> You can use the script tag in PHP
>
> Its like
> <?php phpcode.... ?>
>
> <script language="javascript" src="soruce of the file"
> type="text\javascript"/>
>
> <script language=javascript>
> Funcyion()
> </script>
>
> <?php phpcode ?>
>
> This works
>
> Chetan Dattaram Rane
> Software Engineer
>
>
>
> -----Original Message-----
> From: Shelley [mailto:myphplist@xxxxxxxxx]
> Sent: Tuesday, May 20, 2008 3:06 PM
> To: PHP General list
> Subject:  Help Call Javascript Methods Inside PHP
>
> 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?
> If it is, how?
>
> Thank you very much.
>
> --
> Regards,
> Shelley
>
>


-- 
Regards,
Shelley

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux