50分,获取不了下拉框的值?求助!
获取不了联动下拉框的值?谁来帮下,最好帮我测试下,我测试了一天了,怎么都不行?
<!--#include file="conn.asp"--><% action = request("action") %><% if session("Number") = "" or session("Password") = "" then %><script>alert('你还没有登录呢');</script><%response.Redirect("logout.asp")%><% else %><%IF Request("delid")<>"" Then Sql = "Delete From SysUser Where Number="&Request("delid") Conn.Execute(Sql)End IF%><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link href="css.css" rel="stylesheet" type="text/css"><style>td{font-size:9pt;line-height:120%;color:#353535} body{font-size:9pt;line-height:120%} a:link { color: #000000; text-decoration: none }a:visited { color: #000000; text-decoration: none }a:active { color: #000000; text-decoration: none }a:hover { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }</style></head> <%qxcnc_code = session("Number")qxcnc_ji = session("CategoryID")if qxcnc_ji = 8 then %><body bgcolor="#799AE1"><table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF" vspace="0" hspace="0"> <tr> <td width="4%" height="27" valign="middle" background="images/admin_bg_1.gif" bgcolor="#CCCCCC">.:: </td> <td width="12%" align="center" valign="middle" background="images/admin_bg_1.gif" bgcolor="#CCCCCC"><a href="admin_pass.asp"><img src="images/reload.gif" width="59" height="16" border="0"></a></td> <td align="center" valign="baseline" background="images/admin_bg_1.gif" bgcolor="#CCCCCC">[<a href="admin_pass.asp">用户管理</a>]</td> <td align="center" valign="baseline" background="images/admin_bg_1.gif" bgcolor="#CCCCCC">[<a href="admin_jgh.asp">机构管理</a>]</td> <td align="center" valign="baseline" background="images/admin_bg_1.gif" bgcolor="#CCCCCC">[<a href="admin_bh.asp">编号管理</a>]</td> </tr></table><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#00659C"> <form action="admin_pass_add.asp" method="post" name="form_class_add"> <tr align="center"> <td><font color="#FFFFFF"><strong><font color="#FFFFFF">用户编号</font></strong></font></td> <td><strong><font color="#FFFFFF">用户姓名</font></strong></td> <td width="11%"><font color="#FFFFFF"><strong><font color="#FFFFFF">用户</font>密码</strong></font></td> <td width="11%"><font color="#FFFFFF"><strong><font color="#FFFFFF">用户</font>身份证</strong></font></td> <td width="12%"><font color="#FFFFFF"><strong>所属支行</strong></font></td> <td width="17%"><font color="#FFFFFF"><strong>所属网点</strong></font></td> <td width="9%"><font color="#FFFFFF"><strong>用户类别</strong></font></td> <td width="14%"><font color="#FFFFFF"><strong>操作</strong></font></td> </tr> <tr align="center" bgcolor="#FFFFFF"> <td width="11%"><input name="Number" onFocus="this.value=''" type="text" id="UserNumber" size="15"></td> <td width="11%"><input name="UserName" onFocus="this.value=''" type="text" id="Name" size="15"></td> <td><input name="Password" onFocus="this.value=''" type="password" id="UserPassword" size="15"></td> <td width="11%"><input name="IdentityCard" onFocus="this.value=''" type="text" id="UserIdentity" size="15"></td> <td> <% set rs1=server.CreateObject("adodb.recordset") sql1="select * from SubBranch" rs1.open sql1,conn,1,3 %> <select name="type" size="1" onChange="redirect(this.options.value);"> <option value="0">--支行--</option> <%while not rs1.eof%> <option value="<%=rs1("SubBranchID")%>"><%=rs1("SubBranchName")%></option> <%rs1.movenext wend%> </select> </td> <td> <% set rs2=server.CreateObject("adodb.recordset") sql2="select * from Stipple" rs2.open sql2,conn,1,3%> <select name="as" size="1"> <option value="0">--网点--</option> </select> </td> <td><select name="CategoryID" size="1" id="CategoryID"> <option value="0">----</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> </select></td> <td width="14%"><input type="submit" name="Submit" value="增加用户"></td> </tr></form></table><table width="100%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#CCCCCC" bgcolor="#006699"> <tr> <td width="16%" height="21" align="center"><font color="#FFFFFF">用户类别划分:</font></td> <td width="84%"><font color="#FFFFFF"> 1 网点经办人 2 网点会计 3 网点主任</font></td> </tr> <tr> <td> </td> <td><font color="#FFFFFF"> 4 支行行长 5 分行经办人 6 分行部门负责人 7 分行行长</font></td> </tr> <tr> <td> </td> <td><font color="#FFFFFF">8 系统管理员</font></td> </tr></table><% else %><table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF" vspace="0" hspace="0"> <tr> <td height="27" valign="middle" background="images/admin_bg_1.gif" bgcolor="#CCCCCC">.:: <font color=red><%=session("UserName")%>: 抱歉,您没有权限增删用户,有什么问题请联系系统管理员</font> </td> </tr></table></form></body><% end if %></html><% end if %></div><!--下面为分级菜单的script语句--><script language="javascript">var temp=document.form_class_add.asfunction redirect(x){var ii=0for (var m=temp.options.length-1;m>0;m--)temp.options[m]=null<%while not rs2.eof%>cnt="<%=rs2("SubBranchID")%>"if(cnt==x) {temp.options[i]=new Option("<%=rs2("StippleName")%>","<%=rs2("StippleID")%>")i=i+1}<%rs2.movenextwend%>}</script>
<!--#include file="conn.asp"--><% Number =request("Number") %><% UserName =request("UserName") %><% IdentityCard =request("IdentityCard") %><% Password =request("Password") %><% CategoryID =request("CategoryID") %><% SubBranchID =request("SubBranchID")%><% StippleID =request("StippleID") %><% BranchID="1001"%><% eval(SuBranchID)%><% if Number ="" then %><script>alert('请输入用户代码!');history.back();</script><% else %><% if UserName ="" then %><script>alert('请输入用户名称!');history.back();</script><% else %><% if IdentityCard ="" then %><script>alert('请输入用户身份证!');history.back();</script><% else %><% if SubBranchID ="" then %><% SubBranchID="N" %><% end if %><% if StippleID ="" then %><% StippleID="N" %><% end if %><% if Password ="" then %><script>alert('请输入用户密码!');history.back();</script><% else %><% if CategoryID ="" then %><script>alert('用户类别不能为空!');history.back();</script><% else %><%set rstemp=server.createobject("adodb.recordset")sqltemp = "select * from SysUser where Number='"&Number&"'"rstemp.open sqltemp,conn,1,1if not rstemp.eof then%><script>alert('已有此编号!');history.back();</script><% rstemp.close set rstemp = nothing%><% else %><%set rs=server.createobject("adodb.recordset")sql = "select * from SysUser"rs.open sql,conn,1,3rs.addnewrs("Number") = Numberrs("UserName") = UserNamers("Password") = Passwordrs("CategoryID") = CategoryIDrs("IdentityCard") = IdentityCardrs("BranchID") = BranchIDrs("SubBranchID") = SubBranchIDrs("StrippleID") = StrippleIDrs("CategoryID") = CategoryIDif SubBranchID="N" and StrippleID="N" then UnitLevel= 1rs("UnitLevel") = UnitLevelend ifif SubBranchID<>"N" and StrippleID<>"N" then UnitLevel= 3rs("UnitLevel") = UnitLevelend ifif SubBranchID<>"N" and StrippleID="N" then UnitLevel= 2rs("UnitLevel") = UnitLevelend ifrs.updaters.closeset rs = nothingresponse.redirect "admin_pass.asp"end ifend if end if end if end ifend if %>