Click here to Skip to main content
13,446,392 members (36,774 online)
Click here to Skip to main content


32 bookmarked
Posted 21 Jan 2004

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.
<!-- #INCLUDE FILE="INC/chatprocessing.asp" -->
var sessionID = Request.Form("SessionID");
var roomID = Request.Form("RoomID");
if(sessionID.Count == 0 || sessionID < 0 || roomID.Count == 0) {
	// Incorrect user action.
var userName = getUserNick(0, sessionID);
if(typeof(userName) == "undefined") {
	// Possibly refresh.
else {
	// Possible session already exist
	var realSessionID = enterToTheRoom(roomID, sessionID);
	sessionID = realSessionID;
if(typeof(sessionID) == "undefined" || sessionID == "" || sessionID < 0) {
<title>Welcome <%=userName%> in the chat room</title>
<frameset rows="80,*,100" cols="*" frameborder="no">
  <frame src="toolbar.asp?SessionID=<%=sessionID%>&RoomID=<%=roomID%>" scrolling="no" frameborder="no">
  <frameset rows="*" cols="*,200" frameborder="no">
    <frame src="messages.asp?RoomID=<%=roomID%>" frameborder="no" scrolling="yes">
    <frame src="visitors.asp?SessionID=<%=sessionID%>&RoomID=<%=roomID%>" frameborder="no" scrolling="yes">
  <frame src="newmessage.asp?SessionID=<%=sessionID%>&RoomID=<%=roomID%>" scrolling="no" frameborder="no">

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...

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