PDA

View Full Version : chat



maryam83
دوشنبه 08 خرداد 1385, 19:52 عصر
با سلام
من یه فرمی تقریبا شبیه chat درست کردم
این کداشه
display
<%
myserver=request.servervariables("server_name")
mypath=request.servervariables("script_name")
myself="http://"& myserver&mypath
%>
<html >
<head>
<meta http.equiv=refresh content="5;<%=myself %>">
<title>display page</title>
</head>
<body>
<p align=right><%=now%></p>
<%
temparray=application("talk")
for i=0 to application("tplace")-1
response.write ("<p>"& Temparray1)
next
%>
</body>
</html>




message


<%
if not request.form("message")="" then
application.lock
if application("tplace")>4 then
application("tplace")=0
end if
temparray=application("talk")
temparray=application("tplace")=request.form("message")
application("talk")=temparray
application("tplace")=application("tplace")+1
application.unlock
end if
%>

<html>
<head>
</head>
<body bgcolor="lightblue">
<form method="post" action="message.asp">
<input type="text" size=50 name="message">
<input type="submit" value="send">
<input type="reset" value="clear">
</form>
</body>
</html>


chatpage

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<title>New Page 3</title>
</head>
<frameset rows="*,10%">
<frame src="display.asp">
<frame src="message.asp">
</frameset>
<body>
</body>
</html>
صفحه chatpage درست باز میشه پیغام خطا هم نداره ولی وقتی send رو میزنم چیزی ارسال نمیشه

لطفا اگه میشه راهنماییم کنید:عصبانی++: :عصبانی++: