I'm building an HTML page with javascript. All is fine in the document.write until I want to create an alert box from an onClick on the page.
Here's the script(part) so far:"<td><a href onclick=alert(' Some list& nbsp;here')>The list</a></td>".
This brings back alert box with - Some list here - OK but I want a line break where the second is. I've tried all the \n \r <br> and <p> and %0A combinations I can think of.
Any ideas please. Remember that " doesnt work because the script is aleady within double quotes. ps I cant get a var to work from inside the script either !?
Here's the script(part) so far:"<td><a href onclick=alert(' Some list& nbsp;here')>The list</a></td>".
This brings back alert box with - Some list here - OK but I want a line break where the second is. I've tried all the \n \r <br> and <p> and %0A combinations I can think of.
Any ideas please. Remember that " doesnt work because the script is aleady within double quotes. ps I cant get a var to work from inside the script either !?
Comment