Lesson 12: Create a Chat Window

This very simple chat room script example uses 3 modes of operation. Mode 1 creates a frameset showing mode 2 on top and the default mode 0 on bottom.

Mode 2 is a data view of the chat transcript which auto refreshes every 10 seconds. Mode 0 is also the default mode which is used for the data handling and entry.


Create a node and paste this following code into it’s landing page editor. Goto the node’s url address and test with browser. When testing add /?mode=1 after the address to test the frameset.

 <frameset rows="75%,*">
 <frame src="?mode=2&#bottom" />
 <frame src="?mode=0" />
 <a name="bottom"></a>
  [[INITIALIZE:submitted_entry|"$name:\t $comment<br />\t\n"]]
  [[INPUT:comment|Enter Message]]

Leave a Reply