title: Why does my image not show up when I use Javascript innerHTML to call it?
body: <p>I am pretty new to Javascript, and I was trying somethings out. I am using a function to load an image inside a table using innerHTML. But the image does not show up, unless I call alert("whatever") at the bottom of the function, then it shows up while the alert is visible.
  The code I am using is something like (the function is called from an external js file)</p>
  
  <pre><code>&lt;script&gt;
     function show(){
          document.getElementById('imageHolder1').innerHTML="&lt;a href="#"&gt;&lt;img='photos/picture.jpg' border=0/&gt;&lt;/a&gt;";
      }
  &lt;/script&gt;
  
  &lt;body&gt; &lt;input name="b1" type="button" value="pics" onclick="show()"/&gt;
  &lt;table&gt;&lt;td id='imageHolder1'&gt;picture&lt;/td&gt;&lt;/table&gt;
  &lt;/body&gt; ``
  </code></pre>
  
  <p>I don't understand why it doesn't work, all the examples i have looked at are similar, I see no big differences.Even if I try with out the  tag it doesn't work. Well any help welcome! Thanks in advance, and if you have any suggestions on how to do this (no jquery since I am still learning javascript) I would also appreciate it. Thanks again!</p>