escaping characters in array values
<p>I am trying to do images swaps on mouseovers in an existing slideshow function. The slideshow function requires me to add values to an array. Within that array I want to call my onMouseOver event handlers, but I believe I am running into an issue with escapable characters.</p>

<p>My attempt:</p>

<pre><code>var leftrightslide=new Array()
leftrightslide[0]='&lt;a href="#" onMouseOver="copyspeed=0; document.blah.src=\'images/slides/slideshow_top_01_mo.gif\'" onMouseout="copyspeed=slidespeed"&gt;&lt;img src="images/slides/slideshow_top_01.gif" name=\'blah\'&gt;&lt;/a&gt;';
</code></pre>

<p>On my MouseOvers, nothing is happening, but when I try to replicate this in just HTML, it works fine. This is what leads me to believe I am not handling the apostrophes in my event handler correctly:</p>

<pre><code>&lt;a href="" onMouseOver="document.blah2.src='images/slides/slideshow_top_01_mo.gif';" onMouseout="document.blah2.src='images/slides/slideshow_top_01.gif'"&gt;&lt;img src="images/slides/slideshow_top_01.gif" name='blah2'&gt;&lt;/a&gt;
</code></pre>

<p>Edit: <a href="http://www.pachamber.org/www/test/jp.html" rel="nofollow">Here is a link to a test page with full javascript.</a></p>
