Szymon,

All custom events are piggybacked on "dataavailable" and are injected
with "memo" property on an event object itself. As far cross-window
messaging, I don't think this is possible with current implementation.
Custom events simply bubble up to a top level element in the scope of
the window that originated event.

-- kangax

On Jul 4, 10:41 am, SWilk <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I got stuck by some window to window communication issue.
>
> I have a main window witch open a popup window with window#open
> method. The popup contains a small form.
>
> In onsubmit handler ot that form I generate a custom event, say
> 'vera:euChosen', with a complicated memo.
>
> I fire it with
>   Element.fire(window.opener.document, 'vera:euChosen', memo);
>
> I also do
>   document.observe('vera:euChosen',refToMyHandler);
>
> in parent window. Now I get a result I do not understand.
>
> When the event is fired, the refToMyHandler(evnt) is executed, but
> the evnt is of type 'dataavailable' and there is no trace of my memo.
>
> Am I doing something wrong, or one just can't pass a custom event
> between two windows (even if the firing window is opened by the
> listening window)?
>
> I tried also to fire the event on a popup window and listen on it.
> I tried both window.document documents and I always get dataavailable
> and not my custom event.
>
> How can I transwer my memo object to my main window (window.opener)
> without knowledge of any js function or element of main window in my
> popup window? I need to use this popup in several pages, and would
> like just to pass my data, to any main window. Main window's scripts
> should decide what to do with them.
>
> Any suggestions?
>
> Regards,
> Szymon Wilkołazki
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to