Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > A Challenge: Call parent Javascript function from inside an iframe?

Thread Tools

A Challenge: Call parent Javascript function from inside an iframe?

Shiggity Shiggity is offline
Junior Member
Join Date: Apr 2007
Posts: 7
Oh, by the way, Chris, being a dick to everyone who tries to help you isn't typically the way grown-ups get results. Vide: "your parents" for examples, inter alia.
Reply With Quote
msalehi msalehi is offline
Junior Member
Join Date: Aug 2011
Posts: 1
There is a security protection mechanism to prevent accessing of parent node from within iframe or frames in general when the domain name of frame is different from its parent document.

IE and mozilla deal with the DOM structure differently.

You cannot directly access parent node. you need to access frame owner and from there, access jsvascript function you are looking for.

Unfortunately, I have forgotten how I did access frame owner few months back. As soon as I remember it, I'll post the solution.

Originally Posted by Jonathan N. Little View Post
Chris Ianson wrote:
> "Jonathan N. Little" <(E-Mail Removed)> wrote in message
> news:443406c6$0$3703$(E-Mail Removed).. .
>> Sorry this IS how you reference a function in the parent frame. If it does
>> not work for you then you must be and error of how you are using the
>> function. Without URL only speculation.

> Are you familiar with Google Maps API Jonathan? I have been working with an
> expert in the field and neither of us can get it to work. If you are more
> of an expert with the API then we can talk further.

I am familiar with web design, and JavaScript. That is how you reference
a JavaScript function in a non-named parent frame.

No Details
No Code.

What do you want?

Take care,

Reply With Quote
anne nowess anne nowess is offline
Junior Member
Join Date: Aug 2012
Posts: 1
hello chris, just wanna ask if you have solved this problem? because im facing the same dilemma recently and i just cant find a way how to call a function from a parent page. ive tried 'parent.function()' and 'top.function()' but none worked. i badly need your help, im also using google maps api.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
call a parent javascript function inside from an iframe omprakash Java 0 07-30-2012 06:39 AM
If a class Child inherits from Parent, how to implementChild.some_method if Parent.some_method() returns Parent instance ? metal Python 8 10-30-2009 10:31 AM
Confusion over calling a nested function inside a parent function Pyenos Python 5 12-23-2006 01:46 PM
A Challenge: Call parent Javascript function from inside an iframe? Chris Ianson Javascript 18 04-06-2006 08:49 PM
call a parent javascript function from the child window Filiz Duman Javascript 1 01-21-2004 03:30 PM