Results 1 to 3 of 3

Thread: Web Page Chat

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Smile

    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
    rino_2
    Visual Basic, HTML
    Please Visit my Site: Richard's VB Site

  2. #2
    Lively Member
    Join Date
    Nov 1999
    Location
    Melbourne, Victoria, Australia
    Posts
    126
    Try this .html source

    Code:
    <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>
    Regards,

    Paul Rivoli
    ---------------------
    [email protected]
    http://members.dingoblue.net.au/~privoli

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Smile Thanks

    Thanks for the help privoli!
    rino_2
    Visual Basic, HTML
    Please Visit my Site: Richard's VB Site

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width