Re: How can I use php codes in javascript?
| From: | Burak Delice | Date: | Thu, 20 Jun 2002 01:05:52 +0000 |
| Subject: | Re: How can I use php codes in javascript? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-103055@lists.php.net to get a copy of this message | ||
thanks Justin,
but below function gave an error as "syntax error"
function sil() {
<?
echo("sss");
?>
}
"Justin French" <justin@indent.com.au> wrote in message
news:B9376505.8F41%justin@indent.com.au...
> Well, it depends what you want to achieve.
>
> eg:
>
> ---
> <?
> $myvar = "foo";
> ?>
>
> <A HREF="javascript:alert('<?=$myvar?>');">click</a>
> ---
>
> works fine.
>
>
> remember, PHP is parsed on the server (before anything it's sent to the
> browser), and javascript is parsed on the client side (browser).
>
>
> Justin French
>
>
>
>
> on 20/06/02 10:50 AM, Burak Delice (bdelice@abt.com.tr) wrote:
>
> > hi,
> >
> > I want to use php codes in a java function. Could you help me please.
How
> > can I do this? is this possible? if it is, is there any example about
this
> > on the Internet?
> >
> > thank you very much.
> >
> >
>