Don wrote:
[color=blue]
> How do I pass PHP variables to JavaScript in the returned browser page?
>
> Thanks,
> Don[/color]
Well, you could do this if you have a variable $_POST['name']:
....
some javascript
.....
echo 'var name = ' . $_POST['name'];
....
Just like HTML, but you write valid javascript.
On Mon, 08 Nov 2004 14:04:37 -0600, David Zawislak <davez0411@exci te.com> wrote:
[color=blue]
>Don wrote:
>[color=green]
>> How do I pass PHP variables to JavaScript in the returned browser page?
>>
>> Thanks,
>> Don[/color]
>Well, you could do this if you have a variable $_POST['name']:
>...
>some javascript
>....
>
>echo 'var name = ' . $_POST['name'];
>
>...
>Just like HTML, but you write valid javascript.[/color]
Thanks David. That worked just fine.
Regards,
Don
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
<script language="Javas cript" type="text/javascript">
if (!document.getE lementById) {
top.location.re place("<?php echo $referred_to; ?>");
}
</script>
--
Looks like more of Texas to me.
.... Arizona, where the nights are warm and the roads are straight.
On Thu, 11 Nov 2004 17:14:31 +0100, Jeremy Smith <di99smje@chl.c halmers.se> wrote:
[color=blue]
>Don wrote:[color=green]
>> How do I pass PHP variables to JavaScript in the returned browser page?
>>
>> Thanks,
>> Don[/color]
>
><?
>$hello = "hello";
>?>
>
><script language="javas cript">
>alert("<?=$hel lo;?>");
></script>[/color]
Thanks Jeremy.
Don
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Comment