passing values to a javascript variable
| From: | Romulo Roberto Pereira | Date: | Thu, 21 Jun 2001 19:38:49 +0000 |
| Subject: | passing values to a javascript variable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-54794@lists.php.net to get a copy of this message | ||
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