developerWorks  >  Lotus  >  Forums & community  >  IBM Sametime Forum

IBM Sametime Forum

developerWorks




Sametime Links javascript callbacks
Robert C Barrett 02/06/2004 07:35 PM
Deverloper Toolkits 3.0 Windows NT/2000


I'm building a web app using ST Links and am having trouble getting the callbacks for writeToTranscript and setTypingStatus.

I've reduced my app down to a fairly simple form that:
(1) logs in
(2) enters a place
(3) sends some typing and text data

The callbacks for the number of users in the place, their status, etc. all get called just fine. But these two never get called. What am I missing?

I enclose a copy of my reduced code below. Any help would be greatly appreciated.

thanks,
Rob

<html>
<head>
<SCRIPT src="http://stlinksserver/sametime/stlinks/stlinks.js"></SCRIPT>
<script>
setSTLinksURL("http://stlinksserver/sametime/stlinks", "en_US");
var myUserId = "myuserid";
var myPassword = "mypassword";
function STLinksAppletStarted() {
alert("started -- logging in");
STLinksLogin(myUserId,myPassword,false);
}
function STLinksLoggedIn(userid,displayname) {
alert("logged in -- entering place");
STLinksEnterPlace("Nowhere",true);
}
function STLinksUserEnteredPlace(userid,displayname,placename) {
if (userid==myUserId) {
alert("entered place -- sending chat");
document.applets["STLinksApp"].setIsTyping(true);
document.applets["STLinksApp"].sendText("testing");
document.applets["STLinksApp"].setIsTyping(false);
}
}
function writeToTranscript(source, speakerName, message) {
alert("writeToTranscript: source="+source+" speakerName="+speakerName+"\nmessage="+message);
}
function setTypingStatus(userId, typingStatus) {
alert("setTypingStatus: userId="+userId+" typingStatus="+typingStatus);
}
</script>
</head>
<body>
<script>writeSTLinksApplet()</script>
</body>
</html>

Go back