I am Iframing auto generated data from a platform I am using so I do not have direct access to the Iframes links. So what I was trying to do is write a script that gets the link
or a
value in the Iframe then redirects the parent page with that link
.
Everything is on the same domain, I just cannot edit the page that is auto generating the data so I am using the iframe.
Here is the script I am using / trying to implement and I cannot see what I am doing wrong:
<script>
function replaceLoad(oIframe) {
oIframe.onload = function () {
document.getElementById("replaceLoad").contentWindow.location = "javascript:moveMe()"
}
}
</script>
This is the the iframe html:
<iframe scrolling="no" src="http://www.discoverhomefinder.com/dljones/homes-for-sale/AZ/Anthem?wmode=opaque" frameborder="0" style="border: 0px none; margin-left: 0px; height: 3900px; margin-top: -12%; width: 100%;" onload="replaceLoad(this)">
</iframe>