Dispatcher Initialization:
YAHOO.util.Dispatcher.fetch ('myCustomPort1', 'tabs/getting-params1.html',
// configuration object
{
after: function( area ) {
var foo = 'param1',
boo = 'param2';
myRemoteMethod1( foo, boo, {tee:1, loo: 2});
}
}
);
Dynamic Content - Source Code:
// using the window.myFunction you can force to define a global function, avoid it...
// instead you can use the yahoo namespace, for example (YAHOO.example.myFunction)
window.myRemoteMethod1 = function(foo, boo, obj) {
console.log ('Function: myRemoteMethod1');
console.log ('Scope: ', this);
// in this case the method will be executed under the window scope,
// but will receive a list of arguments.
alert (foo);
alert (boo);
}