Everyone,
I looked around a bit, but honestly wasn't sure what to look for so I'm just going to ask...
Here's my issue. I want to create a Javascript alert box with some line breaks in it. If I put the text in the function it works great. But if I instead echo the text into it from PHP it won't work with the line breaks. Here are the two examples:
This works:
<a href="#" onClick="alert('Test\nTest\nTest');">Test</a>
This doesn't
$message = "Test\nTest\nTest";
<a href="#" onClick="alert('<?php echo $message; ?>');">Test</a>
Any ideas? If I use the function that doesn't work, but have no line breaks it works fine also...
Thanks
Ross
http://jinzora.jasbone.com