After the reply helped me, I asked him to explain why it worked and he gave me a URL explaining escape sequences. I thought I understood the tutorial, but I guess I do not.
The closest that I have come to making this work, is the following code:
Expand|Select|Wrap|Line Numbers
- myDiv.innerHTML += '<td><a href=\"javascript:myCastDetails(\''+(someNumberComing-1)+'\',\'document.getElementById(\'castname'+(someNumberComing-1)+'\').value\',\'document.getElementById(\'casttext'+(someNumberComing-1)+'\').value\',\'document.getElementById(\'castframecolor'+(someNumberComing-1)+'\').value\',\'document.getElementById(\'castpicture'+(someNumberComing-1)+'\').value\');\"><div>Previous</a></td><td align=right><a href="#">Next</a></div></td>';
When you place your mouse over the link generated the output at the bottom of the browser is this:
Expand|Select|Wrap|Line Numbers
- "myCastDetails('0','document.getElementById('castname0').value','getElementById('casttext0').value','getElementById('castframecolor0').value','getElementById('castpicture0').value');"
I would like it to be this:
Expand|Select|Wrap|Line Numbers
- "myCastDetails('0','document.getElementById("castname0").value','getElementById("casttext0").value','getElementById("castframecolor0").value','getElementById("castpicture0").value');"