From:  Martin Honnen <mahotrash@yahoo.de>
Date:  04 Mar 2009 20:43:28 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.web-development
Subject:  

Re: using postMessage with iFrame

NNTP-Posting-Host:  89.244.196.103

carstep wrote:
> Hi,
> 
> The simple question would be:
> in case of iFrame are postMessage a two-way communication?
> (based on https://developer.mozilla.org/En/DOM:window.postMessage)
> 
> The harder question is if the answer is yes:
> why does the following don't work?
>     http://developer.progressiveav.com/test/php/iframetest/testIframe.html
> 
> Look at both the inner frame and the main window's source.
> I want simply send a message to the main window via postMessage. It
> silently aborts.

I think with Mozilla the event is sent to the window, not to the 
document object. So use
   window.addEventListener(...)
not
   document.addEventListener(...)


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/