Re: Help Call Javascript Methods Inside PHP
| From: | Shelley | Date: | Tue, 20 May 2008 09:48:08 +0000 |
| Subject: | Re: Help Call Javascript Methods Inside PHP | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274552@lists.php.net to get a copy of this message | ||
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@persistent.co.in>
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@gmail.com]
> Sent: Tuesday, May 20, 2008 3:06 PM
> To: PHP General list
> Subject: [PHP] 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