Click here to Skip to main content
12,295,482 members (55,898 online)
Click here to Skip to main content


32 bookmarked

Writing ASP Chat using JavaScript and XML (Part 4)

, 21 Jan 2004
The last part of the ASP chat series. This article explains how to provide a chat with multiple rooms.
<title>Available rooms list</title>
<!-- #INCLUDE FILE="INC/chatprocessing.asp" -->
<script language="JavaScript" runat="server" src="INC/RoomOperations.js"></script>
var sessionID = -1;
var ulComplete = false, nrcComplete = false, rchComplete = false;
ulComplete = processUserLogin();
if(!ulComplete) {
	nrcComplete = processNewRoomCreation();
	if(!nrcComplete) {
		rchComplete = processRoomChanging();

if(sessionID < 0) {
	// User already exists.

var roomsList = "";
if(ulComplete || nrcComplete || rchComplete) {
	roomsList = formatAllRooms();
function goToRoom(roomID) {
	document.frmRoomSelect.RoomID.value = roomID;

function defineNewRoom() {


<form action="room.asp" method="post" id="frmRoomSelect" name="frmRoomSelect">
<input type="hidden" name="SessionID" id="SessionID" value="<%=sessionID%>">
<input type="hidden" name="RoomID" id="RoomID">

<form action="newroom.asp" method="post" id="frmNewRoom" name="frmNewRoom">
<input type="hidden" name="SessionID" id="SessionID" value="<%=sessionID%>">
<table border="1" cellpadding="0" cellspacing="0">
<tr><td>Room</td><td>Active Users</td></tr>
To define a new room <a href="javascript:defineNewRoom()">click here</a>.

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Alexander Fedorenko
Web Developer
Ukraine Ukraine
Alexander Fedorenko is a professional C++ developer since 1996. He completed many custom and shareware projects. One of the successful projects is DevPlanner - tool for personal planning and time management.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160525.2 | Last Updated 22 Jan 2004
Article Copyright 2004 by Alexander Fedorenko
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid