Why won't this slideshow code work?
<pre><code>&lt;img id="slideshow" src="4.png" alt="image" width="264" height="264"/&gt;
&lt;script&gt;
    source=["1.jpg", "2.JPG", "3.JPG"];
    for (var i=0; i&lt;source.length; i++)
    {
        document.getElementById("slideshow").src = source[i];
    }
&lt;/script&gt;
</code></pre>

<p>Don't quite understand why this doesn't work, I realise this will stop on the image, well I think so at least lol, but it doesn't show any image.</p>

<p>Any help would be great thanks.</p>

<pre><code>            &lt;img id="slideshow" src="4.png" alt="image" width="264" height="264"/&gt;
            &lt;script&gt;
            source=["1.jpg", "2.JPG", "3.JPG"];
            var i=0;
            var c=0;
            while (i&lt;=0)
            {
            if (c&lt;source.length)
            document.getElementById("slideshow").src = source[c];
            c++;
            else
            c=0;
            }
            &lt;/script&gt;
</code></pre>

<p>any ideas how to get it to stop on each source and then repeat?</p>
