If it's javascript, then be careful about echoing PHP variables into
Javascript strings.  If you have something like (in Javascript)

var myString = '<?php echo $phpString; ?>';

and $phpString contains any apostrophes, then the javascript will break
because Javascript thinks the string has ended prematurely.  E.g, if
$phpString is "My cat's pajamas" then the javascript would be sent to the
browser thus:

var myString = 'My cat's pajamas';

and you can see that there are too many single quotes, which will, of
course, cause Javascript's high-powered debugging utilities to kick in and
give you a highly useful error report.

Pete.

> While working on some web sites which contain mouse over java, and then
> adding in some db stuff via php/mysql, the java seems to break.
> Is there something special I need to do to prevent that break?
> Is this a common problem?
> Does using templates get around that problem ?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to