Developer's Guide - EPiServer World
Developer's Guide - EPiServer World
Developer's Guide - EPiServer World
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Tutorials | 41<br />
2.11 Chat<br />
The Chat Module enables users to interact with other users in real time. To join a discussion, the user simply opens a<br />
page in their browser containing Java applets that connect to a chat server. Discussions take place in chat events, and<br />
several chat events can be active simultaneously.<br />
Chat events isolate discussions. Each chat event keeps a log of all users (and hostnames) that have entered or left the<br />
chat event, what they saidand when they said it. That is, each chat event keeps separate logs and lists of currently logged<br />
in users.<br />
To get started, you will need some information from the chat server provider, such as the chat server’s hostname. This<br />
information must be inserted in the corresponding parameters in the examples below.<br />
2.11.1 Implementing the Chat Applets on an ASP.NET page<br />
This section outlines the implementation of the required chat applets in an ASP.NET page. Details of how an applet is<br />
embedded in a web page differ between browsers, so we will be using a JavaScript to output the HTML that has been<br />
customized for the current browser.<br />
<br />
function makeApplet(sArchive, sCodebase, sCode, sId, iWidth, iHeight,<br />
aParams) {<br />
var _app = navigator.appName;<br />
if (_app == 'Microsoft Internet Explorer') {<br />
document.write('');<br />
document.write('');<br />
document.write('');<br />
document.write('');<br />
document.write('');<br />
document.write('');<br />
document.write('');<br />
NAME="'+aParams[i][0]+<br />
VALUE="'+aParams[i][1]+'">');<br />
for(var i=0; i