Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting src of nested iframe at runtime?

Status
Not open for further replies.

FancyPrairie

Programmer
Oct 16, 2001
2,917
US
I have an iframe nested inside another iframe. When I select a button, declared in the 1st iframe, I want the onclick event of the button to set the src property of the 2nd iframe. I've tried various things with no luck.

ifrm2.src = "..."
ifrm2.frameElement.src = "..."
document.all("ifrm2").src = "..."
top.document.getElementByID("ifrm1").getElementByID("ifrm2").src = '..."

What am I doing wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top