Hi,
I'm trying to create a block with an AJAX call. I have managed this with jQuery before, but now I'm trying with YUI. I think I've managed to include the file correctly, but I'm doing an alert in the init function but nothing is being alerted.
My PHP:
$jsmodule = array(
'name' => 'block_foobar',
'fullpath' => '/blocks/foobar_plugin/module.js',
'requires' => array('base', 'node', 'json')
);
$this->page->requires->js_init_call('M.block_foobar.init',
NULL,
false,
$jsmodule);
My Javascript:
M.block_foobar={
Y : null,
init : function(Y){
alert('hi');
this.Y = Y;
}
};
Also, there are no javascript errors in the firebug window.
Thanks in advance.
Michael