...

View Full Version : Passing a URL to Iframes



Bhunter86
09-27-2002, 07:24 PM
Does anyone now of a way to pass a new URL to an IFrame via another pages onLoad event?

Íkii
09-27-2002, 10:04 PM
sort of depends where the iframe is in relation to the onload page. Just follow the window heirarchy backwards to the top document of the iframe holding page and then downwards to the iframe -- eg

window.opener.top.frames[3].iframename.location.href = "newpage.htm";

Bhunter86
09-27-2002, 10:22 PM
I actually just figured out what I was trying to do. It got a little long winded but it works.

<Body onLoad="top.frames['Framename'].document.iFrameName.location.href='URL';">



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum