function joinChannel() { var channelname = document.forms[0].channels.options[document.forms[0].channels.selectedIndex].value; document.chat.joinChannel(channelname); }