I am creating a user input at one of the events:
var throwConnectBox = function() { chat_box = document.getElementById(\'box\'); div = window.parent.
Try this:
input.onclick = function() { conn.send('$connect\r\n'); };
Steve