en*********@gmail.com wrote:
Is there a PHP command to convert a $string of HTML into something
friendly for innerHTML population? I get a undtermined string constant
error sometimes.
Hi,
If your HTML is not suitable to insert somewhere with innerHTML, try to find
the reason WHAT is causing that.
There is no such thing as 'special innerHTML' encoding.
It is all just html, only retrieved in a different way (via XMLHttpRequest).
I would suggest you try to isolate when this happens, and call the script
that returns the offending html directly.
Then see if you agree with the returned HTML.
It could be a PHP codingmistake, or mayby you are trying to send Javascript
back. (The latter is more difficult, if this is the case: ask again.
Several solutions exists)
Regards,
Erwin Moller