Re: javascript question
| From: | Ignatius Reilly | Date: | Mon, 08 Mar 2004 14:02:07 +0000 |
| Subject: | Re: javascript question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33363@lists.php.net to get a copy of this message | ||
Maybe you forgot a "?":
Alert(<?php echo $message ; ?>); or
^^^
Ignatius
_________________________
----- Original Message -----
From: "Gamze Başaran" <gbasaran@tepeinsaat.com.tr>
To: <php-db@lists.php.net>
Sent: Monday, March 08, 2004 2:49 PM
Subject: [PHP-DB] javascript question
> Hi everyone;
>
> First of all I'm sorry maybe I musn't send this mail to this list but I
> think that someone can help me. Here is my problem:
>
> I use pear templates. In my html template file there is an javascript like
> this:
>
> function validateAll (objForm){
> if (objForm.comp_prg.selectedIndex == 0) {
> alert ("You must choose something");
> return false;
> }
> Return true;
> }
>
> This code is true. But I want to use php variable in this code. Alert
> sentence must be a php_variable. I try
>
> Alert(<php $message?>); or
> Alert(<php echo"$message";*>);
>
> But I it isn't work. Can anybody help me??
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>