Hi,
I create a gadget and use RPC.
A) In JS of client load this code to regist a function:
<code>
var auth = "password";
gadgets.rpc.register('fx_remote_parent_alert', function(msg, auth_key)
{
alert( 'window parent: wellcome!' );
if (auth_key == auth) {
alert( 'window parent: ' + msg );
}
return "Hello";
});
</code>
B) and include a iframe, that is the container. Inside iframe to
performed this code:
<code>
gadgets.rpc.setupReceiver('..', s_location);
var auth = 'password';
function fxCallback( msj ) {
return 'igoogle gadget -> fx_callback inside -> ' + msj;
}
function fxCallRpc(){
gadgets.rpc.call('', 'fx_remote_parent_alert', fxCallback, 'message
to pass from iframe child', auth);
}
//fxCallRpc(); //test
</code>
Reques:
I need to know if is possible in A) to access a js lightweight to
process the code A) , only call to gadgets.rpc.register. Actuality to
call a: http://www.ig.gmodules.com/gadgets/js/rpc.js , the same js to
call gadget igoogle in B)
I probe use the lightweight js in:
http://code.google.com/p/opensocial-resources/source/browse/spec/0.8/gadgets/rpc.js?r=664
but I execute, exist error in the process call
any suggest?? sincerely.
--
You received this message because you are subscribed to the Google Groups
"OpenSocial Application Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/opensocial-api?hl=en.