Menu
Welcome
Quick start guide
Installing on your site
Connecting as operator
Operator commands
API
Operator settings
Roster variables and macroses

Sitehelp API - setName

API :: setName


Function allows to set current name of client in contact list
SITEHELP_API.setName(
	{
		success:  // function will be called once name is successfully set, with new name as first parameter
		error: // function will be called on error, with error message as first parameter
	}
);


Example:

SITEHELP_API.onReady (SetMyName);

function SetMyName () {
	SITEHELP_API.setName(
		{
			name: 'my new roster name',

			success: function (reply_name) {
				alert("My name is set to : " + reply_name);
			},
			error: function (error_msg) {
				alert("setName ERROR:" + error_msg);
			}
		}
	);
};
Copyright 2011-2014 by Sitehelp.im.