Randy Posted August 2, 2006 Share Posted August 2, 2006 I was wondering how I would get the current url of an iframe, I have searched on google but all to no avail. Link to comment https://forums.phpfreaks.com/topic/16346-get-the-current-url-of-an-iframe/ Share on other sites More sharing options...
nogray Posted August 2, 2006 Share Posted August 2, 2006 let's say the iframe id is "frm" you can access the URL by[code]document.getElementById('frm').contentWindow.location.href[/code]This only works if all the pages are on the same domain. Link to comment https://forums.phpfreaks.com/topic/16346-get-the-current-url-of-an-iframe/#findComment-67981 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.