From:  carstep <carstep@gmail.com>
Date:  04 Mar 2009 21:03:40 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.web-development
Subject:  

Re: using postMessage with iFrame

NNTP-Posting-Host:  77.44.34.244

On márc. 4, 12:43, Martin Honnen  wrote:
> carstep wrote:
> > Hi,
>
> > The simple question would be:
> > in case of iFrame are postMessage a two-way communication?
> > (based onhttps://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/

Ty for the fast response, unfortunatelly I began my experience with
window.addEventListener :(, and whatever ( I think I copied one of in
opera working example the code over and leave it as it is)
r. Sandor