求助! asp 网站缺少对象
消息: “changedepartment”未定义
(虽一台电脑看)是
消息: 缺少对象
condition_correct.asp
行: 23
字符: 1
代码: 0
URI: http://127.0.0.1:99/main/condition_correct.asp?dp_name=中共碧安乡委员会
结果是500错误
相关代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../conn/conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%
if session("username")="" or session("pwd")="" then
response.Write"<script>alert('您还未登陆,请返回登陆!')</script>"
response.Write"<script>document.location.href='../login.asp'</script>"
response.End()
elseif session("quanxian")=0 then
response.Write"<script>alert('您没有此项权限!')</script>"
response.Write"<script>document.location.href='index1.asp'</script>"
response.End()
else
%>
<%
id=request.QueryString("id")
sql="select * from workcondition_table where id="&id
set rs=conn.execute(sql)
%>
<form id="form1" name="form1" method="post" action="correct_one_judge.asp?id=<%=id%>">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="1">
<tr>
<td width="2%" bgcolor="#1759AF"> </td>
<td width="86%" bgcolor="#1759AF" class="title"> 部门管理</td>
<td width="10%" bgcolor="#1759AF" class="title" align="left"><a href="correct_judge.asp?dp_name=<%=rs("worker_dp")%>"><img src="../images/return.png" width="16" height="16" border="0" /></a></td>
<td width="2%" bgcolor="#1759AF"> </td>
</tr>
</table>
<table width="100%" height="60" border="0" cellpadding="0" cellspacing="1">
<tr>
<td width="2%" height="20" bgcolor="#1759AF"> </td>
<td width="17%" height="20" align="center" bgcolor="#1759AF" class="title">部门名称:</td>
<td width="79%" height="20" bgcolor="#1759AF" class="title"> <%=rs("worker_dp")%><input name="dp_name" type="hidden" value="<%=rs("worker_dp")%>" /></td>
<td width="2%" height="20" bgcolor="#1759AF"> </td>
</tr>
<tr>
<td width="2%" height="20" bgcolor="#1759AF"> </td>
<td width="17%" height="20" align="center" bgcolor="#1759AF" class="title">人员名称:</td>
<td width="79%" height="20" bgcolor="#1759AF" class="title"> <%=rs("worker_name")%></td>
<td width="2%" height="20" bgcolor="#1759AF"> </td>
</tr>
<tr>
<td width="2%" height="20" bgcolor="#1759AF"> </td>
<td width="17%" height="20" align="center" bgcolor="#1759AF" class="title">出勤时间:</td>
<td width="79%" height="20" bgcolor="#1759AF" class="title"> <%=rs("work_time")%></td>
<td width="2%" height="20" bgcolor="#1759AF"> </td>
</tr>
<tr>
<td width="2%" height="20" bgcolor="#1759AF"> </td>
<td width="17%" height="20" align="center" bgcolor="#1759AF" class="title">出勤情况:</td>
<td width="79%" height="20" bgcolor="#1759AF" class="title">
<select name="seleCondition">
<option selected="selected" value="<%=rs("work_condition")%>"><%=rs("work_condition")%></option>
<% if rs("work_condition")="正常出勤" then %>
<option value="迟到">迟到</option>
<option value="早退">早退</option>
<option value="病假">病假</option>
<option value="事假">事假</option>
<option value="正常工休">正常工休</option>
<%elseif rs("work_condition")="迟到" then %>
<option value="正常出勤">正常出勤</option>
<option value="早退">早退</option>
<option value="病假">病假</option>
<option value="事假">事假</option>
<option value="正常工休">正常工休</option>
<%elseif rs("work_condition")="早退" then %>
<option value="正常出勤">正常出勤</option>
<option value="迟到">早退</option>
<option value="病假">病假</option>
<option value="事假">事假</option>
<option value="正常工休">正常工休</option>
<%elseif rs("work_condition")="病假" then %>
<option value="正常出勤">正常出勤</option>
<option value="迟到">早退</option>
<option value="早退">病假</option>
<option value="事假">事假</option>
<option value="正常工休">正常工休</option>
<%elseif rs("work_condition")="事假" then %>
<option value="正常出勤">正常出勤</option>
<option value="迟到">早退</option>
<option value="早退">病假</option>
<option value="病假">事假</option>
<option value="正常工休">正常工休</option>
<%elseif rs("work_condition")="正常工休" then %>
<option value="正常出勤">正常出勤</option>
<option value="迟到">早退</option>
<option value="早退">病假</option>
<option value="病假">事假</option>
<option value="事假">正常工休</option>
<%end if%>
</select> </td>
<td width="2%" height="20" bgcolor="#1759AF"> </td>
</tr>
<tr>
<td width="2%" height="20" bgcolor="#1759AF"> </td>
<td width="17%" height="20" align="center" bgcolor="#1759AF" class="title">出勤备注:</td>
<td width="79%" height="20" bgcolor="#1759AF" class="title">
<textarea name="txtRemark" cols="40" rows="5"><%=rs("work_remark")%></textarea></td>
<td width="2%" height="20" bgcolor="#1759AF"> </td>
</tr>
<tr>
<td height="20" bgcolor="#1759AF"> </td>
<td height="25" colspan="2" align="center" bgcolor="#1759AF" class="title"><label>
<input type="submit" name="Submit" value="确认修改" />
</label></td>
<td height="20" bgcolor="#1759AF"> </td>
</tr>
</table>
</form>
<%
end if
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
</body>
</html>
提交修改出现500错误
正常情况提交修改后会跳出“修改成功!”
<!--#include file="../conn/conn.asp"-->
<%
if session("username")="" or session("pwd")="" then
response.Write"<script>alert('您还未登陆,请返回登陆!')</script>"
response.Write"<script>document.location.href='../login.asp'</script>"
response.End()
else
%>
<%
id=request.QueryString("id")
dp_name=request.Form("dp_name")
condition=request.Form("seleCondition")
remark=request.Form("txtRemark")
sql="update workcondition_table set work_condition ='"+condition+"',work_remark='"+remark+"' where id ="&id
set rs=conn.execute(sql)
'response.Write "document.location.href='correct_judge.asp?dp_name='"&dp_name&"''"
response.Write"<script>alert('修改成功!')</script>"
%>
<script>
document.location.href='correct_judge.asp?dp_name=<%=dp_name%>'
</script>
<%
rs.close
conn.close
set rs=nothing
set conn=nothing
response.End()
%>
<%end if%>
[ 本帖最后由 jgbazsh 于 2014-4-27 20:29 编辑 ]