...

View Full Version : Nested Iframes access



scotthawks
01-11-2007, 05:18 PM
thanks in advance for any help received.

i have an html page with nested iframes.
ex.
page1.htm

<html>
<head>
<body>
<iframe name=frame1 id=frame1 src="page2.htm"><i/frame>
</body>
</html>

page2.htm

<html>
<head>
<body>
<iframe name=frame2 id=frame2 src="about:blank"><i/frame>
</body>
</html>

what i want to do is call a function to replace the blank page in frame2 from the top page. i have seen several references to this type of call:
window.frames['framename'].frames['framename'].document
but i can't seem to get it to work. i can use location.replace(pagename) to replace the html in frame1, but not frame2.

Thanks in advance for help.

scotthawks
01-11-2007, 05:50 PM
found the answer to my own problem. i'll post for anyone else that may need.

answer is this.

frame1.frame2.location.replace(pagename)

Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum