Javascript Selection and Selection appears in a div
<p>If anyone could be of assistance with my problem then that would be great! I have my script so far that when you click on one of three anchor links the picture corresponding to that anchor link appears in a DIV, and then on the second selection it appears in the div next to that one, and the same with the third, I am trying to work out how to remove the image from the DIV so I am able to reselect an option and the new selection to be placed in the DIV that is empty....my example only shows 3 selections to choose from but this will be 24 soon.</p>

<p>Also how I can retrieve different information from the database to show in the DIVS and to be to able to submit certain data to the database depending on the selection you choose.</p>

<p>Thanks very much for you time! and any suggestions would be appreciated!.</p>

<p>regards,
alistair</p>

<pre><code>&lt;script type="text/javascript" language="javascript"&gt;
var pos = 0;
function showPic (whichpic) { 
if (document.getElementById) { 
try {
if ((document.getElementById('placeholder1').src+
document.getElementById('placeholder2').src+
document.getElementById('placeholder3').src).search(whichpic.href) &gt; -1)
throw "blah";
document.getElementById('placeholder'+ ++pos).src = whichpic.href;
//document.getElementById('placeholder2').src = whichpic.href;
//document.getElementById('placeholder3').src = whichpic.href;
if (whichpic.title) { 
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title; 
} else { 
document.getElementById('desc').childNodes[0].nodeValue =           whichpic.childNodes[0].nodeValue; 
}
return false; 
} catch(e) {
alert("u mad?");
return false;
}
} else { 
return true; 
}
}
&lt;/script&gt;

&lt;div style="border: 1px solid #999; padding: 1em; margin: 0 0 15px 0;"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a onclick="return showPic(this)" href="http://jsfiddle.net/img/ico-add-       resource.png" title="img 1"&gt;img 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a onclick="return showPic(this)" href="http://jsfiddle.net/img/info-close.png"      title="img 2"&gt;img 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a onclick="return showPic(this)" href="http://jsfiddle.net/img/keys.png"  title="img    3"&gt;img 3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p id="desc"&gt;Choose an image to begin&lt;/p&gt;
&lt;img id="placeholder1" src="http://jsfiddle.net/img/shadow.gif" alt="" /&gt;
&lt;img id="placeholder2" src="http://jsfiddle.net/img/shadow.gif" alt="" /&gt;
&lt;img id="placeholder3" src="http://jsfiddle.net/img/shadow.gif" alt="" /&gt;
&lt;/div&gt;
</code></pre>
