I have a piece of javascript that creates an HTML table, saving each row of the table into an array. I want one of the table cells on each row to be clickable.
The following code works fine and when cell3 is clicked, it displays a message box:
array.push("<tr><td>cell1</td><td>cell2</td><td onclick='alert(this);'>cell3</td></tr>")
My problem is that if I wanted the message box to say "hello", I can't get it to work because of the quotes, any ideas?
It's a quote within a quote within a quote and my brain is melting.
Thanks for any help in advance.