title: javascript load image to div onclick
body: <p>I want to display image user click from image link in a for loop to a div. </p>
  
  <p>my for loop is as follows.</p>
  
  <pre><code>&lt;a href='' name=my_image[i]
  
  onclick='disp_image('link_image_url')'id=my_image[i]  class='popup-open'&gt;&lt;img src=my_image[i] width='80' height='65'&gt;&lt;/a&gt;;
  </code></pre>
  
  <p>and my javascript function </p>
  
  <pre><code>&lt;script language=\"javascript\"&gt;
  
  
  function disp_image(url){
  
  document.getElementById('image').innerHTML ="&lt;img src=url width='100' height='105'&gt;";
  
  ;}
  
  &lt;/script&gt;
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>However it is not being load in my div content </p>
  
  <pre><code>&lt;div id="image"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>can someone has an idea how can i display selected image in a div content dynamically</p>