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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a popup referencing its opener's parent? 2

Status
Not open for further replies.

LikeThisName

Vendor
May 16, 2002
288
US
i can reference parent: parent.formname.mylistbox
i can reference the window that opened a popup. opener.formname.listbox

but how do i reference the parent of an iframe that opened a popup?

tia,



LikeThisName <- ? Sorry It's Taken =)
 
Just combine what you've already posted:
opener.parent.whatever
Code:
[b]page01.html[/b]
<script language=JavaScript>
function sayHello() {
   alert("Hello");
}
</script>
<body>
<form name=blahForm>
<iframe src="page02.html"></iframe>
</form>
</body>
Code:
[b]page02.html[/b]
<script language=JavaScript>

</script>
<body onload="window.open('page03.html')">
<form name=blahForm>

</form>
</body>
Code:
[b]page03.html[/b]
<script language=JavaScript>

</script>
<body>
<form name=blahForm>
<input type=button value='click me' onclick='opener.parent.sayHello();'>
</form>
</body>

-kaht

banghead.gif
 
geesh, i never cease to amaze myself, thanks for pointing out that, and i apologize for posting without having tried that. i tried parent.opener because i wanted ther parent of the opener but this gives me the opener's parent. makes perfect sense now thanks!

LikeThisName <- ? Sorry It's Taken =)
 
yes very cool, that we can reference scripts from other pages.

LikeThisName <- ? Sorry It's Taken =)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top