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

Targeting the parent of an I-frame

Status
Not open for further replies.

gameon

Programmer
Feb 23, 2001
325
GB
Hi, I am using I-frames on my site. Is there a way that I can call java-script functions that live in the parent frame of an i-frame - or just target it to go to a different url.

Also, is there a script that I can put in my i-frame that checks that its in my i-frame...

Cheers if you can answer one or both of these questions...

M@)
 
for your first question, place this in the iframe:

parent.functionName()

dunno bout the answer for the 2nd.....

-kaht

banghead.gif
 
If you give your iframe a name, you can use window.name in the page itself to see if it is in the IFRAME.

Adam
while(ignorance==true){perpetuate(violence,fear,hatred);life=life-1};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top