Hi Alex thanks for reply
When you say to define the client side function rcube_webmail.prototype.your_command, is this different to using the register_command function like follows?
rcmail.register_command('mycommand', mycommand_function, true);
function mycommand_function() {
alert('test');
}