Re: PHP & Javascript

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

 



fyi your talk about simple javascript using PHP??
that's a lame..

u need to upgrade your skill for using AJAX

actualy google is your friend.. but what u want anyway.. u must to describe
the case not some talking like above
----- Original Message -----
From: "Mikael Grön" <php@xxxxxxxx>
To: "php windows" <php-windows@xxxxxxxxxxxxx>
Sent: Wednesday, April 18, 2007 10:00 PM
Subject: Re:  PHP & Javascript


> Google! is your friend, but I acutally enjoy typing. :)
>
> Do something like this:
>
> <script type="text/javascript">
>     window.location="another.php?UID=<?php echo
> $thevariablecontainingthenumbertwo; ?>";
> </script>
>
> or something like that. :)
> You know, PHP parses before the browser gets to do JavaScript stuff, so
> when the browser gets the code, it'll say UID=2 ... or what ever
> variable you've got stored in $thevariablecontainingthenumbertwo.
>
> Mike
>
>
> Alf Stockton skrev:
> > Please suggest a way to pass the value contained in a PHP variable to
> > Javascript.
this line is very weird.. pass value from PHP to JS is easy.. u need to
beware about wrong statement.
but pass value from JS to PHP is a tricky things
> > I have $ID with a certain value in PHP and want to do a Javascript
> > window.location="Another.php?UID="+2;
> > and replace the above hardcoded 2 with the value in $ID.
u need AJAX.. u might try search on YAHOO-AJAX (i don't quited remember the
name.)

well it only work "well" on ie actualy.. but if you able to customize well..
opera, mozilla and soon able to accept your script.

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux