title: get iframe url and update input text
body: <p>I have an iframe in a page and i want to get the current url for that iframe and update an input text with that url.</p>
  
  <p>I found that i can get the url for the iframe using </p>
  
  <pre><code>document.getElementById("iframe_id").contentWindow.location.href
  
  &lt;iframe id="iframe" name="iframe" src="" width="100%" height="100%" style="border-width: 0px; border-color:#ffffff; border-style: solid;" scrolling="no" border="0" class="auto-style1" frameborder="0" marginheight="0" marginwidth="0"&gt; &lt;/iframe&gt;
  
  &lt;script type="text/javascript"&gt;
  var link = document.getElementById("iframe").contentWindow.location.href ;
  document.Show.link.value = link;
  
  &lt;/script&gt;
  &lt;strong&gt;link for the iframe :&lt;/strong&gt;
      &lt;input name="link" type="text" size="100" /&gt;
  
  &lt;a onclick="document.all.iframe.src=''" href="url" target="iframe"&gt;LINK&lt;/a&gt;
  </code></pre>
  
  <p>that didnt work.</p>
  
  <p>I dont know how to use it and update input text with that url every time the ifram's url changes</p>
  
  <p>iframe url may change if some one clicks on link inside it</p>
  
  <p>best regards,</p>