Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

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.
/**
 *  Class for accessing persistent room information from xml node.
 */
function RoomInfo(xmlNode) {
	this.xmlNode = xmlNode;
	this.getRoomID = RoomInfo_getRoomID;
	this.getRoomName = RoomInfo_getRoomName;
	this.setRoomName = RoomInfo_setRoomName;
	// Reuse same functions from Session class
	this.setAttribte = Session_setAttribte;
	this.getAttribte = Session_getAttribte;
}

/**
 *  Extracting room id of owned room.
 *  @return The room id.
 */
function RoomInfo_getRoomID() {
	var id = this.getAttribte("ID");
	return id;
}

/**
 *  Extracting user nick.
 */
function RoomInfo_getRoomName() {
	var name = this.getAttribte("NAME");
	return name;
}

/**
 *  Assigning new user nick.
 */
function RoomInfo_setRoomName(name) {
	this.setAttribte("NAME", name);
}

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.

License

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

Share

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.

| Advertise | Privacy | Mobile
Web03 | 2.8.140821.2 | Last Updated 22 Jan 2004
Article Copyright 2004 by Alexander Fedorenko
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid