RE: passing values to a javascript variable
| From: | Tim Ward | Date: | Fri, 22 Jun 2001 07:49:03 +0000 |
| Subject: | RE: passing values to a javascript variable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-54846@lists.php.net to get a copy of this message | ||
have you viewed the source? - could be something to do with the semi-colons
or, more likely, what addslashes($data_data) evaluates to.
Tim Ward
Senior Systems Engineer
Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html
> -----Original Message-----
> From: Romulo Roberto Pereira [mailto:rpereira@vox2vox.com]
> Sent: 21 June 2001 20:39
> To: php-general@lists.php.net
> Subject: passing values to a javascript variable
>
>
> Hello!
>
> The following give me: unterminated string constant (this is
> a javascript
> error)
>
> when I execute the following:
>
> while ($row = mysql_fetch_array ($data_query_action)) {
> $data_data = $row["data_data"];
> }
> echo "<script language=\"javascript\">\n var
> ndata=\"".addslashes($data_data)."\";\nPutCode
> (ndata);\n</script>";
>
> Ideas? Please I need help.
>
> Thank you,
>
> Rom
>
>