title: javascript change Image by clicking thumbnail
body: <p>I am a newbie in javascript and tried a lot of things for hours, but nothing worked.</p>
  
  <p>I will change a big imgage by clicking on a thumbnail.</p>
  
  <p>Untill now I got following script. Not much really... :-(</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function changeImage() {
          document.getElementById("img").src="img/upload/test1.jpg";
      }
  &lt;/script&gt;
  
  &lt;img id="img" name="change" src="img/upload/test.jpg"&gt;
  &lt;img src="img/thumbnail/test.jpg" alt="" id="imgClickAndChange" onclick="changeImage()"&gt;
  &lt;img src="img/thumbnail/test1.jpg" alt="" id="imgClickAndChange" onclick="changeImage()"&gt;
  </code></pre>
  
  <p>All big picture are under <code>src"img/upload/xxx.jpg"</code> and all thumbnails under <code>src="img/thumbnail/xxx.jpg"</code>. When I click the thumbnail, it have to change the big picture and it have to give the parameter in the javascript. Like <code>onclick="changeImage(xxx.jpg)</code>.</p>
  
  <p>The problem is every page have other pictures. I get them from a database. So the name of the picture is like a variable. I hope you understand. It is hard for me to explain. :-(</p>
  
  <p>Thanks for your help in advance.</p>
  
  <p>Greets Yanick</p>