title: addEventListener not triggering function on click
body: <p>the solution to this problem is probably pretty simple, but I need some help.</p>
  
  <pre><code>var x;
  for(x in document.getElementsByTagName("img"))
      x.addEventListener('click',openPage, false);
  
  function openPage() {
      alert("clicked");
  }
  </code></pre>
  
  <p>I'm not getting an alert when I click on an <code>&lt;img src="something" /&gt;</code> tag. Anyone know why? Also, is my loop necessary?</p>