XMLHTTP + Javascript + Asp chat room, no need to implement (1)

Source: Internet
Author: User

Use xml (standardization is getting closer and closer) without refreshing *. ASP.
Without refreshing the new one, the speech is displayed one by one.
Use the Application variable to store chat records, so you need to create a virtual directory
The server does not need to support xml (standardization is getting closer and closer). You only need to support ASP and create virtual directories.
The following code is passed in nt4.0 + iis4.0. I guess it's similar in your win2000.
If you have any questions, please kindly advise: netnice@chinaok.net

######### Index. asp ##############################

<Html>
<Head>
<Title> blue butterfly chat room Www.ChinaOk.net </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Style TYPE = "text/css">
BODY {FONT-SIZE: 9pt}
TD {FONT-SIZE: 9pt}
. Tbljm {BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; color: #000000 ;}
</Style>
<Script language = "Javascript">
Function openWin ()
{Winst = "Status = yes, scrollbars = yes, resizable = yes, width =" + (screen. availWidth-10) + ", height =" + (screen. availHeight-50) + ", top = 0, left = 0 ";
Window. open (about: blank, 7923 sdfsdfs, winst );
}
Function form_onsubmit (obj)
{Var no = 0, psd = "1234567890 ";
If (obj. UserName. value = "") {alert ("Enter your nickname! "); Obj. UserName. focus (); return false ;}
If (obj. userName. value. indexOf ("")>-1 | obj. userName. value. indexOf ("")>-1 | obj. userName. value. indexOf (")>-1) {alert (" your nickname contains invalid characters! "); Obj. UserName. focus (); return false ;}
OpenWin ();
Return true;
}
</Script>
</Head>

<Body bgcolor = "# ffffff" text = "#000000" valign = "center" onload = "javascript: document. form1. OK. blur ()" background = "images/greystrip.gif">
<Center> <TABLE border = 0 width = "67%">
<TBODY>
<TR>
<TD valign = center align = "middle" style = "FONT-SIZE: 10.5pt"> <FONT color = # 0033ff> :::::::::: </FONT> </TD>
</TR> </TBODY> </TABLE> </center>
<Table width = "200" border = "0" style = "BORDER-RIGHT: #003366 1px solid; BORDER-TOP: #003366 1px solid; BORDER-LEFT: #003366 1px solid; BORDER-BOTTOM: #003366 1px solid "cellspacing =" 0 "cellpadding =" 0 "align =" center ">
<Tr>
<Td bgcolor = "# 304d7c" height = "25">
<Div align = "center"> <font color = "# ffffff"> User Logon </font> </div>
</Td>
</Tr>
<Tr>
& Lt; td height = "121" & gt;
<Form name = "form1" method = "post" action = "main. asp" onSubmit = "return form_onsubmit (this)" target = "7923 sdfsdfs">

<Table width = "199" border = "0" cellspacing = "0" cellpadding = "0" background = "images/greystrip.gif">
<Tr>
<Td height = "35">
<Div align = "center"> User Name:
<Input name = "UserName" size = "10" maxlength = "20" class = tbljm>
</Div>
</Td>
</Tr>
<Tr>
<Td height = "41">
<Div align = "center"> sex:
<Input type = radio value = "0" name = sx checked> male | <input type = "radio" value = "1" name = sx> female
</Div>
</Td>
</Tr>
<Tr>
<Td height = "40">
<Div align = "center">
<Input type = "submit" name = "OK" value = "" class = tbljm>
<Input type = "reset" name = "nook" value = "re-write" class = tbljm> <BR> <br> <font color = red> Demonstrate xml (standardization is getting closer and closer) http Implementation of the new technology without refreshing <br> code downloadable </font> <br> </div>
</Td>
</Tr>
</Table>
</Form> </td>

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.