Current Version: 0.35
Last Updated: 4/3/2003 21:25 server time
Hello, and welcome to the Notelet Nodelet Chatterbox Client. This project's goal is to provide a button in your notelet nodelet that will allow you access to a dynamic chatterbox that refreshes every 30 seconds.
How is this different from other chatterbox clients? - Because you are calling it from the everything2 site, there are no user authentication issues. Of course, right now you can't submit messages, but once that is functional it will not require you to go to an untrusted third party.
What do I need to run this? - The current version is functioning in IE 5.5 and above. I have run some basic tests using Phoenix 0.4 and Mozilla 1.2, but those are not supported in this release.
For you IE users: This calls an ActiveX component to do the parsing. You may need to download the MSXML SDK at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/sdk_intro_6g53.asp. Mozilla has the parsing built in natively, so it won't need anything special at all.
How do I get this working?! - Because of the limited amount of space in the notelet nodelet, especially for lower level noders, I suggest copying the code into a .js file and hosting it somewhere you trust, then importing that. You are more than welcome to use the script below as is, I will try hard not to change the .js file I am hosting without testing it first.
I can't get it to work! - Please remember that this is Alpha quality code. If it doesn't work for you please /msg me with your browser (IE), version (5.5) and platform (Windows 98, Mac) and I will do my best to find out what is going on.
The notelet nodelet code:
<form><input type="button" value="Chatterbox"
(Note: you may have to remove the line breaks from the above code)
The .js code
This code takes advantage of the capabilities of newer browsers to parse the DOM of XML structures. By hitting the Universal Message XML Ticker, then parsing that, we get the messages. It also helps reduce server load. Yea!
If you have suggestions, concerns, complaints, etc, please /msg them to me. kThanx.
Things I know are missing - lessee, pipelinks, handling of /me, the fact that it is in a textarea box, ability to submit messages. Let me know if you have a feature or bug request not on this list.
0.35 - Combined the timer script and chatterbox to one window. Added start and close buttons.
//Global Window Handler
//temp browser switch. This needs to be
//determined at run-time
ie = true;
oDoc = document;
//get the XML
oResponseXML = loadXMLIE();
//the start of the msglist is defined here
msgListNode = oResponseXML.firstChild.nextSibling.firstChild.nextSibling.nextSibling;
//clear out the textarea box
oDoc.messages.msgs.value = "";
posterName = msgListNode.lastChild.firstChild.firstChild.firstChild.nodeValue;
posterText = msgListNode.lastChild.firstChild.nextSibling.firstChild.nodeValue;
oDoc.messages.msgs.value += posterName+" - "+posterText+"\n\n";
//Set this to refresh every 30 seconds
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
xmlhttp.open("GET", "http://www.everything2.com/index.pl?" +
oResponse = xmlhttp.responseXML;
var winProps, winURL;
winProps = "width=450,height=250,resizable=yes," +
vWin = open("", "", winProps);
oDoc = vWin.document;
//Set up the form
oDoc.writeln("<textarea rows=\"10\" cols=\"45\" name=\"msgs\">");
oDoc.writeln("Press start to begin");
oDoc.writeln("</textarea><br><input type='button' value='start'" +