Hi,
I'm trying to work out how to use nested quotes.
The first link works, but the second fails because of the hilighted apostrophe
Any ideas will be greatly appreciatedCode:<html> <head> <title>test</title> </head> <body> <div id="grid"></div> <script type="text/javascript"> var tableRow = New Array(1); tableRow[0] = '<p><a href="#" onclick="alert(\'hello\');return false;">test 1</a></p>'; tableRow[1] = '<p><a href="#" onclick="alert(\'There\'s no place like home\');return false;">test 2</a></p>'; var txt = ''; for(var iLoop = 0; iLoop <= 1; iLoop++){ txt +=tableRow; } document.getElementById("grid").innerHTML = txt; </script> </body> </html>
Cheers Al




Reply With Quote