How to write one of the simplest chat programs? _ Programming 10000 Q

Source: Internet
Author: User

Chat.html

<title> Wonderful spring Breeze simple chat </title>

<frameset rows= "*,100" >
<frame src= "chatopinions.asp" >
<frame src= "chatform.asp" >
</frameset>

chatopinions.asp
<meta Http-equiv=refresh content= "5; Url=chatopinions.asp "><body bgcolor=ffffff>
<center>
<table border=0 width=350>
&LT;TR&GT;&LT;TD width=50>
<% =application ("A9")%></td><td width=300><% =application ("B9")%>
</td></tr><tr><td>
<% =application ("A8")%></td><td><% =application ("B8")%>
</td></tr><tr><td>
<% =application ("A7")%></td><td><% =application ("B7")%>
</td></tr><tr><td>
<% =application ("A6")%></td><td><% =application ("B6")%>
</td></tr><tr><td>
<% =application ("A5")%></td><td><% =application ("B5")%>
&LT;/TD&GT;&LT;/TR&GT;&LT;TR&GT;&LT;TD width=50>
<% =application ("A4")%></td><td><% =application ("B4")%>
</td></tr><tr><td>
<% =application ("A3")%></td><td><% =application ("B3")%>
</td></tr><tr><td>
<% =application ("A2")%></td><td><% =application ("B2")%>
</td></tr><tr><td>
<% =application ("A1")%></td><td><% =application ("B1")%>
</td></tr></table>
<table border=0 width=350>
&LT;TR&GT;&LT;TD align=right>
Get your chat at <a ref= "http://www.submitside.com" &GT;SUBMITSIDE&LT;/A&GT;: Free script.
</td></tr></table>
</center>
</body>
chatform.asp
<%
If Request.Form ("Opinion") = "" Then
ShowForm ()
Else
If session ("AA") = "" Then
NewUser ()
Goahead ()
Else
Goahead ()
End If
End If%>
<% Sub showform ()%>

<center>
<form Method=post action=chatform.asp>
<table border=0><tr><td>
<% if session ("AA") = "" Then%>
Choose a name or nickname
<input Type=text Name=name size=20><br>
Enter your opinion
<% Else%>
<% =session ("AA")%>
<% End If%>
<input type=text size=60 name=opinion value= "<% =request.form (" Opinion ")%>" ><BR>
<input type=submit value= "Submit">
</td><tr></table>
</form>
</center>
</body>
<% End Sub%>

<% Sub goahead ()%>

<%
Bb=request.form ("Opinion")
Bb=server.htmlencode (BB)

Application.Lock
Application ("B1") =application ("B2")
Application ("B2") =application ("B3")
Application ("B3") =application ("B4")
Application ("B4") =application ("B5")
Application ("B5") =application ("B6")
Application ("B6") =application ("B7")
Application ("B7") =application ("B8")
Application ("B8") =application ("B9")
Application ("B9") =bb

Application ("A1") =application ("A2")
Application ("A2") =application ("A3")
Application ("A3") =application ("A4")
Application ("A4") =application ("A5")
Application ("A5") =application ("A6")
Application ("A6") =application ("A7")
Application ("A7") =application ("A8")
Application ("A8") =application ("A9")
Application ("A9") =session ("AA")
Application.UnLock
%>

<center>
<form Method=post action=chatform.asp>
<table border=0><tr><td>
<% =session ("AA")%> <input type=text size=60 name=opinion>
<br><input type=submit value= "Submit ">
</td></tr></table>
</form>
</center>
</body>
<% End Sub%>

<% Sub NewUser ()%>
<%
Aa=request.form ("Name")
Aa=server.htmlencode (AA)
Session ("AA") =aa
%>

<% End Sub%>

[1]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.