# Redefining JS Callbacks JS callbacks are used to establish communication between Chat application and your web site. For example add a user to friends list, report a user, etc. Flash object calls relevant JS functions with parameters. You can redefine these functions and add custom code to perform the required action. In most cases you will have to use AJAX to do that.
function Z5ChatEvent(event, param1, param2) { switch(event) { case 'addFriend': var userID = param1; var friendID = param2; // TODO add your code here break; case 'removeFriend': var userID = param1; var friendID = param2; // TODO add your code here break; case 'block': var userID = param1; var blockID = param2; // TODO add your code here break; case 'unblock': var userID = param1; var blockID = param2; // TODO add your code here break; case 'abuse': var userID = param1; var friendID = param2; break; } }