这个聊天室思路是以框架结构来实现,下框架输入信息,上框架显示信息,但上框架就是不能显示出来,
请问各位高手们,怎么修改下面的程序……
我觉得是“发送.asp”程序有误,但又不知道怎么修改,我是初学者
这是登录框----用户登录.asp
<html>
<head>
<title>用户登录</title>
</head>
<body>
登录
<form action="处理登录数据.asp" method="post">
你的名字是 :
<input name="username" type="text" id="username">
您所在的机器号是:
<input name="no" type="text" id="no">
<input type="submit" name="Submit" value="提交">
</form>
</body>
</html>
这是"处理登录信息.asp"
<%@ language=JScript%>
<%try
{ username = Request("username")(1)
no = Request("no")(1);
len_no = no.length;
len_username = username.length;
if (username.length > 0)
{ Response.Redirect("网页重定向.asp");}
else{Response.Write("登录失败");
}}
catch(e){}
%>
我是用框架做的,分上下两块,上方为"自言自语聊天室.asp"
<%@ language=JScript%>
<html>
<meta http-equiv="refresh" content="2" url-自言自语聊天室3.asp>
<script language="javascript">
function scrollWindow()
{ this.scroll(0,75000)
setTimeout('scrollWindow()',200)
}
scrollWindow();
</script>
<meta name="generator" content="Microsoft Visual Studio">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<body>
情订奇缘聊天室欢迎光临
<% Response.Write(Application("talk"));
%>
</body>
</html>
下方为 "发送.asp"
<html>
<head>
<title>颜色处理</title>
</head>
<body>
<form method=post action="发送.asp">
<input name="message" type=text size=50>
<select size="1" name="mycolor">
<option value="yellow" selected>黄色</option>
<option value="blue">蓝色</option>
</select>
<input name="submit" type=submit id="submit" value=发送>
</form>
</body>
</html>
下面为“发送.htm”
<html>
<%@ language=JScript %>
<% flag=1;
username=Session("username");
no=Session("no");
mywords=Request("message");
mycolor=Request("mycolor");
len_mywords=mywords.length;
var I; for (I=1;I<=len_mywords;I++)
{ if ("<"= =mywords.substring(I,1))
{flag=0;}}
if (1= =flag)
{mywords="姓名: "+username+" 说: "+"<font color="+mycolor+"> "+mywords;
Application.Lock();
Application("talk")=Application("talk")+mywords+"</font><br>";
Application.UnLock();}
%>
<a href="颜色选择.htm">返回</a>
[此贴子已经被作者于2007-9-1 20:15:53编辑过]