title: Detecting src/location change in a iframe object
body: <p>I have an iframe object pointing to a specific page. For example, </p>
  
  <pre><code>&lt;iframe src="http://en.wikipedia.org/wiki/Special:Random"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>I want to have an alert whenever the location of the iframe changes because the user has clicked a link inside it.</p>
  
  <p>Doing <code>onLoad="alert(this.ContentWindow.location.href);"</code> yields nothing. </p>
  
  <p>Doing <code>onLoad="alert(this.src);"</code> yields the initial src (../wiki/Special:Random) no matter what the user has clicked.</p>
  
  <p>The user will stay within the same domain, so the Same Origin policy is not violated.</p>