这下面是这整个页面的代码,请各位帮忙看看,到底是什么地方出错了,我真不知道XmlHttp链接的是哪个页面,谢谢了阿!
<!-- #include virtual = "/inc/function.inc" -->
<%
Set rs=Server.CreateObject("ADODB.Recordset")
'当前用户所在的服务器
sql="select server from names where id="&sqlstr(tcbh)
rs.open sql,conn_ora_rlzy,3,2
servername=rs("server")
serverip=Request.ServerVariables("LOCAL_ADDR")
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="deeptree.css">
<title>用户管理</title>
<style>
.chn {font-family: 宋体; font-size: 9pt}
A:link {font-size:12px;text-decoration: none; color: #013064}
A:visited {font-size:12px;text-decoration: none; color: #0e3a6a}
A:active {font-size:12px;text-decoration: none}
</style>
<script language="JavaScript"><!--
//当前用户所在服务器
userserver="<%=servername%>";
function xuanzerenyuan(tcbh,server)
{
window.open ("xuanzerenyuan.asp?tcbh="+tcbh,"admin_temp");
//window.alert("xuanzerenyuan.asp?tcbh="+tcbh);
//管理员只能更改本地通讯录的信息,总部管理员可以更改所有信息
if(userserver!=server&&userserver!="zongbu")
{
btn_baocun.style.display="none";
}
else
{
btn_baocun.style.display="";
}
}
function tianjia()
{
var str=showModalDialog("tianjiarenyuan/renyuan.asp","","center:yes;status:no;scroll:no;help:no;dialogWidth:500px;dialogHeight:290px");
}
function tianjialinshiyonghu()
{
form1.fullname.style.backgroundColor="";
form1.fullname.readOnly=false;
form1.fullname.value="";
form1.dept_name.style.backgroundColor="";
form1.btn_xuanzebumen.style.display="";
form1.dept_name.value="";
form1.tcbh.style.backgroundColor="";
form1.tcbh.readOnly=false;
form1.tcbh.value="";
form1.shortname.style.backgroundColor="";
form1.shortname.readOnly=false;
form1.shortname.value="";
form1.password.value="";
form1.username.value="";
form1.caozuo.value="tianjia";
}
function xuanzebumen()
{
var
str=showModalDialog("tianjiarenyuan/linshirenyuan/bumen.asp","","center:yes;status:no;scroll:no;help:no;dialogWidth:500px;dialogHeight:290px");
if(str!=null)
{
form1.dept.value=str.substr(0,str.indexOf(","));
form1.dept_name.value=str.substr(str.indexOf(",")+1);
}
}
function baocun()
{
if(form1.mphone.value!=""&&!ismobile(form1.mphone.value))
{
window.alert("输入的手机号码不是有效的手机号码!");
return;
}
form1.submit();
}
function zengjiaquyu()
{
if(form1.value!="")
{
var xinzengquyu= new Array();
xinzengquyu[0]=new Option(form1.xinquyu.value,form1.xinquyu.value);
form1.quyu.add(xinzengquyu[0]);
form1.quyu[form1.quyu.length-1].selected=true;
form1.xinquyu.value="";
xuanzequyu();
}
}
function shanchu()
{
var msg=window.confirm("确实要删除当前记录?",289,"删除确认")
if(msg==1)
{
var renyuan=""
for(i=0;i<document.all.length;i++)
{
if(document.all(i).type=="checkbox")
{
if(document.all(i).checked==true)
{
renyuan+=","+document.all(i).id
}
}
}
//删除左侧的","号
if(renyuan.substring(0,1)==",")
{
renyuan=renyuan.substring(1);
}
window.open("shanchu.asp?renyuan="+renyuan,"admin_temp")
}
}
function yonghujiancha()
{
window.open("yonghujiancha.asp?tcbh="+form1.tcbh.value+"&username="+form1.username.value,"admin_temp")
}
function StateXML(state){
var str="<message txt='"+state+"'/>"
var doc=new ActiveXObject("Microsoft.XMLDOM")
doc.async=false
doc.loadXML(str)
return doc.transformNode(xsldoc)
}
var xsldoc=new ActiveXObject("Microsoft.XMLDOM")
xsldoc.async=false
xsldoc.load("deeptree.xsl")
function GetXml(objContainer,id){
var XmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
objContainer.innerHTML=""
objContainer.send="true"
XmlHttp.open("get","server_chazhao.asp?name="+names.value,true)
objContainer.innerHTML=XmlHttp.responseTxt
}
function chazhao()
{
if(names.value!="")
{
window.open("server_chazhao.asp?name="+names.value,"admin_temp");
}
else
{
xuanzequyu(tree,0)
}
}
function xuanzequyu(objContainer,id)
{
var XmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
objContainer.innerHTML=StateXML("正在加载...")
objContainer.send="true"
XmlHttp.onreadystatechange=function(){
if(XmlHttp.readyState==4){
if(XmlHttp.status==200){
var Xmldoc=XmlHttp.responseXML
if(Xmldoc.documentElement.hasChildNodes())
objContainer.innerHTML=Xmldoc.transformNode(xsldoc)
else
objContainer.innerHTML=StateXML("正在加载...")
}
else
{
objContainer.innerHTML=StateXML("加载失败...")
}
}
}
XmlHttp.open("get","server.asp?id=0&name=&quyu="+quyu[quyu.selectedIndex].value,true)
XmlHttp.send()
}
//手机号码合法性检查函数
function ismobile(number)
{
if(number.search(/^0{0,1}13[0-9]{9}$/)!=-1)
{
return true;
}
else
{
return false;
}
}
function haomajiancha(number)
{
if(number!="")
{
if(!ismobile(number))
{
window.alert("输入的手机号码不是有效的手机号码!");
}
}
}
--></script>
</head>
<body vlink="#0000FF" topmargin="0" leftmargin="2" class="chn" onload=xuanzequyu(tree,0)>
<table border="1" width="100%" height="100%" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF" class="chn" >
<tr height="10">
<td width="898" colspan="2">
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="bt" bgcolor="#99CCFF" id=menu>
<tr>
<td>
<table cellpadding="2" class=chn>
<tr>
<% '总部管理员可以添加和删除用户
if serverip="191.0.0.44" then
%>
<td id="btn_tianjia" onMouseOut="this.style.backgroundColor='';this.style.color=''" onMouseOver="this.style.cursor='default';this.style.backgroundColor='#000080';this.style.color='#FFFFFF'" onClick="tianjia()"> 添加 </td>
<td id="btn_shanchu" onMouseOut="this.style.backgroundColor='';this.style.color=''" onMouseOver="this.style.cursor='default';this.style.backgroundColor='#000080';this.style.color='#FFFFFF'" onClick="shanchu()"> 删除 </td>
<% end if %>
<td id="btn_baocun" onMouseOut="this.style.backgroundColor='';this.style.color=''" onMouseOver="this.style.cursor='default';this.style.backgroundColor='#000080';this.style.color='#FFFFFF'" onclick=baocun()> 保存 </td>
<td id="btn_bangzhu" onMouseOut="this.style.backgroundColor='';this.style.color=''" onMouseOver="this.style.cursor='default';this.style.backgroundColor='#000080';this.style.color='#FFFFFF'" onClick="bangzhu('wenjianzhonglei.asp')" style="display:none"> 帮助 </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="300" style="line-height: 100%">
<table height="100%" width="100%" border="1" cellspacing="0" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class=chn>
<tr height="10"><td>
通讯录:<select size="1" name="quyu" style="font-size: 10pt" onChange="xuanzequyu(tree,0)">
<% if not isnull(servername) and servername<>"zongbu" then %> <option value="bendi">本地通讯录</option><% end if %>
<option value="quanju">全局通讯录</option>
</select> <input type="text" name="names" size="15" value=""> <input type="button" value="查找" name="B1" onClick="chazhao()">
</td></tr>
<tr><td>
<div class="deeptree" id=tree style="overflow: auto; height: 100%; width: 350;">
</div>
</td></tr>
</table>
</td>
<td width="700" valign="top">
<table border="0" class="chn" height="235" width="310">
<form method="POST" action="baocun.asp" name="form1" target="admin_temp">
<tr>
<td width="120" align="right" height="28"> </td>
<td width="176" height="28"> </td>
</tr>
<tr>
<td width="120" align="right" height="25">姓名:</td>
<td width="176" height="25"><input type="text" name="fullname" size="20" readonly style="background-color: #CCCCCC"></td>
</tr>
<tr>
<td width="120" align="right" height="25">所在部门:</td>
<td width="176" height="25"><input type="text" name="dept_name" size="20" readonly style="background-color: #CCCCCC"><input type="button" value="▼" name="btn_xuanzebumen" style="font-size: 2mm" onclick=xuanzebumen() style="display:none"></td>
</tr>
<tr>
<td width="120" align="right" height="25">统筹编号:</td>
<td width="176" height="25"><input type="text" name="tcbh" size="20" readonly style="background-color: #CCCCCC"></td>
</tr>
<tr>
<td width="120" align="right" height="25">拼音缩写:</td>
<td width="176" height="25"><input type="text" name="shortname" size="20"></td>
</tr>
<tr>
<td width="120" align="right" height="25">用户名:</td>
<td width="176" height="25"><input type="text" name="username" size="20" onChange="yonghujiancha()"></td>
</tr>
<tr>
<td width="120" align="right" height="25">密码:</td>
<td width="176" height="25"><input type="text" name="password" size="20"></td>
</tr>
<tr>
<td width="120" align="right" height="25">手机号码:</td>
<td width="176" height="25"><input type="text" name="mphone" size="20" onchange=haomajiancha(this.value)></td>
</tr>
<tr>
<td width="120" align="right" height="25">本地通讯录序号:</td>
<td width="176" height="25"><input type="text" name="localorderid" size="20"></td>
</tr>
<tr>
<td width="296" align="center" height="25" colspan="2">
<span id=baocuntishi></span>
</td>
</tr>
</table>
</td>
</tr>
<input type="hidden" name="caozuo" value="">
<input type="hidden" name="bumenxuanze" value="">
<input type="hidden" name="dept" value="">
</form>
</table>
<iframe
framespacing="0" border="false" frameborder="0" src="" scrolling="no" name="admin_temp" width="100%" height="0" align="default"></iframe>
</body>
</html>