People who surf the internet very often are afraid that few of them have gone to chat rooms and Shinti. Just a little attention and you'll find that most of these chat rooms are maintained using CGI programs or applets developed by Java. Programmers who have developed such CGI or applets know that this kind of development work is time-consuming and laborious. So is there a simpler and less effort to develop the way? The answer is yes.
The introduction of ASP is a lot of computer magazine introduced, here is not to repeat.
First, chat room planning:
1, talk capacity storage Save Party type Select : Show - ( ) ( ) Storage save in take service ? asp has two kind Select , one type is to This -part -style, A kind is with number According to library . But pen Sense asp to , , , , , , , FAR No such as ADO (Active data object) to for to number according to library refers to to more than . to Lee with ado,asp to number According to the library Spirit Live work such as insert into, delete except, more new, check and so on . Pen selection optional access According to the library to save saving talk about &NBSP content. The number according to library , only guarantee leave one day ( can root according to lan Real love conditions ( , , , , short) on in .
2, chat Room interface design: In order to customers can easily browse the content of the site, but also to show as much as possible the content of the chat room, the author in a homepage design of three frames. The left frame shows the index of the site. The right frame is divided into two frames. A frame of 70% is used to display the contents of the current chat room, and a frame of 30% is used to provide a text input box and a button for user feedback.
3, into chat Day room The step : like large multiple number chat Day Room A sample, First should this to for to with user A a login record face, from user to from to or (No.) Self with -Italy to the of the same code. such as fruit lost into with user name with line with user name phase with, show with user heavy new Select Optional with user name or heavy New output into secret code, to security license in line with user Name is only one . Login LU into work after into into the chat day room, inside show show frame Show " Huan welcome plus into" welcome letter . users to to in &NBSP Enter area to enter into talk in .
Second, the design process and development skills:
1, the design of ODBC system data Source: As mentioned earlier, this development using ASP to operate the ADO, so you must first set the data source. In the NT Server's Control Panel, double-click the ODBC icon to add a System DSN to the System DSN page, select Microsoft Access driver,data Source Name ' fybchat ', Database Select the Chat.mdb in the chat directory. The database consists of the following fields: Name, content, password, chattime, chatdate, which stores names, conversations, passwords, conversation times, and conversation dates, respectively.
2, Login interface design: Login interface for an HTML page, contains some warning information and a form. Get the account number and password since the form, as follows:
The Submit button is used to excite the receivedata.asp. The ASP file is primarily to ensure that no two users in the chat room are in the same account. After the user submits the information, the file opens Chat.mdb check if there is already the account number, if there is, but the password is not correct to remind users to re-enter the password, if not then the user smoothly into the chat Room. The function of entering the chat room interface is completed by the following statements:
Note that there is a trick here to hide the user's account in the client's browser with the parameter kname, so that the user submits his account each time he submits the conversation.
3, the text input area design: The text input area is produced by the frft.asp. As mentioned above, each time the user submits the conversation, he submits his account, and the action of the user submitting the conversation is to activate the forum.asp. The role of forum.asp is to refresh the contents of the chat room. Frft.asp content is as follows
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.