Rep:[PHP] Re: Passing a PHP variable to javascript
| From: | regardepas Sanete | Date: | Mon, 19 Aug 2002 14:34:18 +0000 |
| Subject: | Rep:[PHP] Re: Passing a PHP variable to javascript | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-113203@lists.php.net to get a copy of this message | ||
Nice,
Thank you
-----Message d'origine-----
De: Chris Schoeman <c.schoeman@eudoramail.com>
A: php-general@lists.php.net
Date: 19/08/02
Objet: [PHP] Re: Passing a PHP variable to javascript
This is one way to do it
<?php
echo "<SCRIPT LANGUAGE=\"JavaScript\">\n";
echo "<!--\n";
echo "alert(\"$text\")\n";
echo "//-->\n";
echo "</SCRIPT>\n";
?>
Chris
On Mon, 19 Aug 2002 12:54:57 GMT, mtphp@ifrance.com (Michael) wrote:
>Hello everyone,
>
>This may seem a newbie question...
>
>I have a PHP variable containing the text of the alert I want to
display
>($text) and I want to have it displayed in a javascript alert box
>(something like alert($text) ).
>I couldn't find out how to sort this out...
>
>Regards,
>Michael
>
>
>_______________________________________________________________________
_______
>Pour mieux recevoir vos emails, utilisez un PC plus performant !
>Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
>http://www.ifrance.com/_reloc/signhdell
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
______________________________________________________________________________
Pour mieux recevoir vos emails, utilisez un PC plus performant !
Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
http://www.ifrance.com/_reloc/signhdell