I have a iFrame content which is having inside another iFrame. I want to get inside iFrame src content. how can i do this using javascript?
A:
iframeInstance.contentWindow.document - this document loaded from SRC url. and vice verse - to get from inner document to parent use: parent.document
Dewfy
2009-08-12 06:58:58
i got src of outer iframe. if i want the inner iframe src how can i get ? can u pls give me an example regarding my question ? thanks.
paulrajj
2009-08-12 07:08:16
A:
The outer page:
<html>
<body>
<iframe id="ifr1" src="page1.htm"></iframe>
<iframe id="ifr2" src="http://www.google.com"></iframe>
</body>
</html>
page1.htm:
<html>
<body>
<script type="text/javascript">
document.write(parent.document.getElementById('ifr2').src);
</script>
</body>
</html>
Joshua
2009-08-12 07:39:32
i cant get my actual result, but may this answer helpful to me.. thanks..
paulrajj
2009-08-12 11:19:22