sadier

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  50 随笔 :: 274 文章 :: 276 评论 :: 61万 阅读
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

//查询是否需要弹出用户树,当没有分类或非组分类时不需弹出
function ChkCategoryID(CatID)
{
 
 if (CatID == "")
 {
  alert("请先选择分类!");
  return false;
 }
 
 var SoapBody = "<CatID>";
 SoapBody += CatID;
 SoapBody += "</CatID>";
 
 var url = "../Common/JumpWebService.asmx";
 var MethodName = "ChkIsGroupByCatID";
 var result = RemoteRun(url, MethodName, SoapBody);

 if( result == "true")
 {
  //可以显示树
 }
 else
 {
  alert("公开分类的对象为全体,个人分类的对象为作者本身,不需指定对象!");
  return false;
 }
 return true; 
}



function RemoteRun(page, Method, SoapBody)
{
 var url = page + "?methodname=" + Method;
 var xmlhttp,dom,node,xmlDOC;
 
 var SoapHead = "<?xml version='1.0' encoding='utf-8'?>" +
     "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Body><" + Method + " xmlns='http://localhost'>";
 var SoapTail = "</" + Method + "></soap:Body></soap:Envelope>";

 var SoapRequest = SoapHead + SoapBody + SoapTail;
 
 xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 xmlhttp.Open("POST",url,false);
 xmlhttp.setRequestHeader("Content-Type", "text/xml;charset=utf-8");
 xmlhttp.setRequestHeader("SOAPAction", "http://localhost/"+Method);
 xmlhttp.setRequestHeader("Content-Length",SoapRequest.length);
 xmlhttp.Send(SoapRequest);
 
 if( xmlhttp.Status == 200 )
 {
  var result = xmlhttp.responseXML.getElementsByTagName(Method + "Result");
  if(result)
  {
   return result(0).text;
  }
 }

 return "失败,请检查网络是否通畅。";
}

posted on   毛小华  阅读(1634)  评论(0编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
点击右上角即可分享
微信分享提示