Just to make sure, does your container page (the social site containing the
gadgets) have something like:

<script type="text/javascript" src="
http://shindig.example.org/gadgets/js/rpc.js?c=1";></script>

And then for each gadget iframe on the page generate:
<iframe
  .. params..
  src="http://example.org/gadgets/ifr?..params#rpctoken=12345";
  name="remote_iframe_123"
  id="remote_iframe_123">
</iframe>

<script type="text/javascript">
gadgets.rpc.setRelayUrl("remote_iframe_123", "
http://example.org/gadgets/ifr?..params#rpctoken=12345";);
gadgets.rpc.setAuthToken("remote_iframe_123, "12345");
</script>

If not, that would be the reason for rpc's not getting through

On Fri, Oct 16, 2009 at 1:03 AM, Ivan Žužak <izu...@gmail.com> wrote:

> Hi all,
>
> I'm trying to establish direct communication between two gadgets
> loaded on a container. On one gadget, I register a procedure using
> gadgets.rpc.register, and on another gadget I invoke gadgets.rpc.call
> passing the ID of the first gadget ("remote_iframe_0") and the
> registered procedure name.
>
> However, the call seems to never leave the sender gadget as I'm
> getting the "No relay set (used as window.postMessage targetOrigin),
> cannot send cross-domain message" error from wpm.transport.js.
>
> This, and the "...gadget-to-gadget (thru container) communication..."
> from the rpc.js header comment makes me wonder if this scenario is
> actually possible (not considering workarounds using pub-sub or
> gadget-container-gadget communication)? If not, can someone briefly
> explain the reasoning behind not enabling this?
>
> Grateful for any feedback,
> Ivan
>

Reply via email to