Click to See Complete Forum and Search --> : Web Page Chat
rino_2
May 20th, 2000, 10:56 PM
Hi,
I have a little web site in the making and would like to add a small chat facility to it, just to make it that little bit more professional. Does anybody have any idea how I could do this using VBS? If you can tell me where to obtain source code that would be great! Thanks
privoli
May 21st, 2000, 03:03 PM
Try this .html source
<html>
<head>
<title>IRC Chat</title>
</head>
<body background="irc_chat.gif">
<script language="VBScript"></SCRIPT>
<basefont face="Courier New">
<center><font size=7>
<b>Chat Page</b>
</font><br><center>
<form name=WEBChat>
Chat NickName:<input name="NickName" value="" maxlength="32" size="25">
<input type=Button value=" Join the chat " name="FluxBtn" onClick=Flux>
<p>
</form>
</center><br>
<OBJECT
STANDBY="Downloading the Microsoft MSChat ActiveX Control"
CODETYPE="application/x-oleobject"
CLASSID="clsid:D6526FE0-E651-11CF-99CB-00C04FD64497"
CODEBASE="http://www.ms-normandy.com/chat/MSChatOCX.Cab#Version=4,71,108,0"
WIDTH=95%
HEIGHT=350
ID=Chat>
<PARAM NAME="UIOption" VALUE="4095">
<PARAM NAME="Appearance" VALUE="5">
<PARAM NAME="BorderStyle" VALUE="0">
<PARAM NAME="BackColor" VALUE="13883354">
</OBJECT>
<script language="VBScript">
<!--
Dim szChannel
SUB Flux
Dim Form
Set Form = Document.WEBChat
If (Chat.State = 1) Then
Chat.EnterRoom "mic:\\irc.chat.com\#chitchat", "", Form.NickName.Value, "ANON", 1, 1
Else
If (Chat.State = 2) Then
Chat.CancelEntering
Chat.ClearHistory
Else
If (Chat.State = 3) Then
Chat.ExitRoom
Chat.ClearHistory
End If
End If
End If
END SUB
SUB Chat_OnStateChanged(ByVal NewState)
If (NewState = 1) Then
Document.WEBChat.FluxBtn.Value = " Join the chat "
Chat.BackColor = 13883354
Else
If (NewState = 2) Then
Document.WEBChat.FluxBtn.Value = "Cancel Entering"
Chat.BackColor = 33023
Else
If (NewState = 3) Then
Document.WEBChat.FluxBtn.Value = "Leave the chat"
Chat.BackColor = 49152
End If
End If
End If
END SUB
-->
</script>
</TD></TR></Table><P>
<hr>
<b>Instructions:</b> Enter your chat <b>NickName</b> then Click the <b>Join the Chat</b> button.
<br>Enter your message text in the lower left box of the chat frame, then press <b>Return</b> to Chat!
<br>
<br>This applet requires <i>Microsoft Internet Explorer 3.0 or higher.</i>
<br>
</body>
</html>
rino_2
May 22nd, 2000, 12:46 AM
Thanks for the help privoli!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.