title: document.getElementById("").getElementsByTagName("img")[0].src = Not Working
body: <p>I have these 3 lines of code in an external javascript file</p>
  
  <pre><code>function init(){
  document.getElementById("upcoming_event").getElementsByTagName("img")[0].src = "images/fastnet_2013_poster.jpg";
      document.getElementById("club_championship").getElementsByTagName("img")[0].src = "images/club_championship.png";
      document.getElementById("setMembership").getElementsByTagName("img")[0].src = "images/join_our_club.png";
  }
  
  document.addEventListener( "DOMContentLoaded" , init , false);
  </code></pre>
  
  <p>This code works perfectly on <a href="http://lizzymurphy.hostoi.com/" rel="nofollow">this site</a> which i used just to develop a little bit of it with 000webhosting.</p>
  
  <p>But I have now moved my hosting to hosting24 to complete the development of the site. When i load the site through the new host(hosting24) the images are not getting loaded.</p>
  
  <p>I have taken these 3 line of code out and tried them in an <code>&lt;body onload="init()"&gt;</code> but this dose not load the images either.</p>
  
  <p>I know that both methods above are being called  as i have got them to display a <code>window.alert("Display")</code>.</p>
  
  <p>Is there another way of doing this?</p>
  
  <p>(<code>document.getElementById("upcoming_event").getElementsByTagName("img")[0].src = "images/fastnet_2013_poster.jpg";</code>) that i could try and use? Or solve my problem. </p>