CAXL (the Jabber web SDK) doesn't have a "search for contact by partial name" method, but that should be easy to do in Javascript. Here's one way of doing it:
var searchstring = "joe";
client.entitySet.each(function(entity) {
if (entity instanceof jabberwerx.RosterContact) {
var displayName = entity.getDisplayName();
if (displayName.indexOf(searchstring) > -1) {
alert("Found " + searchstring);
}
}
}
Comments
0 comments
Please sign in to leave a comment.