People who often rush on the Internet are afraid that few people have never gone to the chat room and chat. Just keep a little attention and you will find that these chat rooms are mostly maintained using CGI programs or Applets developed by JAVA. Programmers who have developed this type of CGI or Applet know that this kind of development work is time-consuming and laborious. So is there a simpler and labor-saving development method? The answer is yes.
There are many computer magazines that have been introduced to the introduction of ASP, and I will not go into details here.
1. Planning of chat room:
1. Selection of the content of the conversation: In what way should the content of the conversation be stored on the server? There are two options for ASP, one is in the form of text documents and the other is in the form of databases. But the author feels that ASP’s instructions for the operation of the text are far less than those provided by ADO (Active Data Object). Therefore, using ADO, ASP can operate flexibly on the database, such as inserting, deleting, updating, querying, etc. The author selects the Access database to store the content of the conversation. The content of this database is only reserved for one day (the length of time can be determined according to the actual situation of the LAN).
2. Chat room interface design: In order for customers to browse the content of the site and display the content of the chat room as much as possible, the author designed three frames in a homepage. The frame on the left shows the Index of the site. One frame on the right is divided into two frames on the upper and lower. The upper frame accounts for 70%, which is used to display the current chat room content; the lower frame accounts for 30%, which is used to provide a text input box and a button for user feedback.
3. Steps to enter the chat room: Like most chat rooms, first, you should provide the user with a login interface, and the user enters his/her own name or another name and his/her own password as he/she will. If the entered username is the same as the online username, the user is prompted to reselect the username or re-enter the password to ensure that all online usernames are unique. After logging in, success, enter the chat room, and the content display frame shows the welcome message "Welcome to join". Users can enter the conversation content in the text input area.
2. Design process and development skills:
1. Design the data source of the ODBC system: As mentioned earlier, this development uses ASP to operate the ADO, so the data source must be set first. Double-click the ODBC icon in the control panel of the NT server, add the system DSN on the System DSN page, select Microsoft Access Driver, Data Source Name is 'fybchat', Database, select Chat directory. This database includes several fields below: name, content, password, chattime, chatdate, respectively, to store the name, conversation content, password, talk time, and talk date.
2. Login interface design: The login interface is an html page, containing some warning messages and a Form. This Form is used to obtain an account and password, as shown below:
<form method="post" action="">Account:
<input type="text" name="usname" >Password:
<input type="password" name="uspassword" >
</center >
<input type="submit" value=" enter" >
<input type="reset" value=" Refill" >
</center >
<input type="hidden" name="content" value="" >
</form>
Inspire by submit button. This ASP file is mainly to guarantee that there are no two users in the chat room with the same account. After the user submits the information, the document opens and checks whether it has the account. If there is, but the password is incorrect, remind the user to enter the password again. If there is no, then the user will enter the chat room smoothly. The function of entering the chat room interface is completed by the following sentences:
<FRAMESET ROWS="70%,30%" >
<FRAME SRC="" NAME="main" MARGINWIDTH="1"
MARGINHEIGHT="1" Noresize >
<FRAME SRC="?kname= <% =name%>" NAME="footnotes"
MARGINWIDTH="1" Noresize >
</FRAMESET >
Note that there is a trick here, which hides the user's account in the customer's browser through the parameter kname. In this way, the user submits his account every time he submits the content of the conversation.
3. Design of the textbook input area: The textbook input area is generated by. As mentioned above, every time the user submits the content of the conversation, he also submits his account, and the user's action of submitting the content of the conversation is to activate it. The function is to refresh the content of the chat room. Contents are as follows
<!DOCTYPE HTML PUBLIC " -//IETF//DTD HTML//EN" >
<html >
<head >
<meta http-equiv="Content-Type" content="text/html; charset=gb_2312-80" >
<meta name="GENERATOR" content="Microsoft FrontPage 2.0" >
<title >
</head >
<body >
<% kname=("kname")% >
<base target="main" >
<form name="fm1" method="POST" action="">
<p align="center" ><input type="text" size="90" name="content" > <p align="center" ><input type="button" name="B1" value=" Submit/ Fresh">
<input type="reset" name="B2" value=" Rewrite" >
<input type="hidden" name="kname" value="">
There are many computer magazines that have been introduced to the introduction of ASP, and I will not go into details here.
1. Planning of chat room:
1. Selection of the content of the conversation: In what way should the content of the conversation be stored on the server? There are two options for ASP, one is in the form of text documents and the other is in the form of databases. But the author feels that ASP’s instructions for the operation of the text are far less than those provided by ADO (Active Data Object). Therefore, using ADO, ASP can operate flexibly on the database, such as inserting, deleting, updating, querying, etc. The author selects the Access database to store the content of the conversation. The content of this database is only reserved for one day (the length of time can be determined according to the actual situation of the LAN).
2. Chat room interface design: In order for customers to browse the content of the site and display the content of the chat room as much as possible, the author designed three frames in a homepage. The frame on the left shows the Index of the site. One frame on the right is divided into two frames on the upper and lower. The upper frame accounts for 70%, which is used to display the current chat room content; the lower frame accounts for 30%, which is used to provide a text input box and a button for user feedback.
3. Steps to enter the chat room: Like most chat rooms, first, you should provide the user with a login interface, and the user enters his/her own name or another name and his/her own password as he/she will. If the entered username is the same as the online username, the user is prompted to reselect the username or re-enter the password to ensure that all online usernames are unique. After logging in, success, enter the chat room, and the content display frame shows the welcome message "Welcome to join". Users can enter the conversation content in the text input area.
2. Design process and development skills:
1. Design the data source of the ODBC system: As mentioned earlier, this development uses ASP to operate the ADO, so the data source must be set first. Double-click the ODBC icon in the control panel of the NT server, add the system DSN on the System DSN page, select Microsoft Access Driver, Data Source Name is 'fybchat', Database, select Chat directory. This database includes several fields below: name, content, password, chattime, chatdate, respectively, to store the name, conversation content, password, talk time, and talk date.
2. Login interface design: The login interface is an html page, containing some warning messages and a Form. This Form is used to obtain an account and password, as shown below:
<form method="post" action="">Account:
<input type="text" name="usname" >Password:
<input type="password" name="uspassword" >
</center >
<input type="submit" value=" enter" >
<input type="reset" value=" Refill" >
</center >
<input type="hidden" name="content" value="" >
</form>
Inspire by submit button. This ASP file is mainly to guarantee that there are no two users in the chat room with the same account. After the user submits the information, the document opens and checks whether it has the account. If there is, but the password is incorrect, remind the user to enter the password again. If there is no, then the user will enter the chat room smoothly. The function of entering the chat room interface is completed by the following sentences:
<FRAMESET ROWS="70%,30%" >
<FRAME SRC="" NAME="main" MARGINWIDTH="1"
MARGINHEIGHT="1" Noresize >
<FRAME SRC="?kname= <% =name%>" NAME="footnotes"
MARGINWIDTH="1" Noresize >
</FRAMESET >
Note that there is a trick here, which hides the user's account in the customer's browser through the parameter kname. In this way, the user submits his account every time he submits the content of the conversation.
3. Design of the textbook input area: The textbook input area is generated by. As mentioned above, every time the user submits the content of the conversation, he also submits his account, and the user's action of submitting the content of the conversation is to activate it. The function is to refresh the content of the chat room. Contents are as follows
<!DOCTYPE HTML PUBLIC " -//IETF//DTD HTML//EN" >
<html >
<head >
<meta http-equiv="Content-Type" content="text/html; charset=gb_2312-80" >
<meta name="GENERATOR" content="Microsoft FrontPage 2.0" >
<title >
</head >
<body >
<% kname=("kname")% >
<base target="main" >
<form name="fm1" method="POST" action="">
<p align="center" ><input type="text" size="90" name="content" > <p align="center" ><input type="button" name="B1" value=" Submit/ Fresh">
<input type="reset" name="B2" value=" Rewrite" >
<input type="hidden" name="kname" value="">