<script type='text/javascript'>
function urlget(){

   var url = parent.link_frame.location.href;
  document.getElementById('urlarea').innerHTML = url;
}
</script>
<textarea name="urlarea" id="urlarea"></textarea>
<a onclick='urlget()'></a>

it should get the url of the top frame(link_frame) and put in the textarea.

MDanz,

Try ...

<script type='text/javascript'>
function urlget(){
  var url = parent.link_frame.location.href;
  var txt = (!url) ? 'URL not found' : url;
  var area = document.getElementById('urlarea');
  if(area) { area.innerHTML = txt; }
  else { alert(txt); }
}
</script>

... and

<a href="" onclick='urlget(); return false;'>Get link frame's URL</a>

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.