null

来源:互联网 发布:淘宝海报制作软件 编辑:程序博客网 时间:2024/05/22 01:34

function AjaxSubmit( sendStr,sDBName )

 var Soap = escape( sendStr );
 var xmlObj = new ActiveXObject("Microsoft.XMLHTTP");
 xmlObj.open("post","/"+g_sCurrPath+"/" + sDBName + "/CheckPublicFund?OpenAgent",false);
 xmlObj.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
 xmlObj.send(Soap);
     var getxml = xmlObj.responseText;    
 returnxml(getxml);

}
function returnxml( getxml ){
 var RTStr = "";
 f.CheckFund.value = "0";
  var xmlDoc =new ActiveXObject("Microsoft.XMLDOM");
   xmlDoc.async = false;
  xmlDoc.loadXML(getxml);  
  var getTag =  xmlDoc.getElementsByTagName("result"); 
  RTStr = getTag.item(0).childNodes.item(0).text
 if( RTStr == "" ) RTStr = "0";
 var amount = parseFloat( RTStr ) - parseFloat( f.FeeSJApplyPay.value );
 var checkInfo = "";
 var oDIV_CheckFundInfo = document.getElementById( "div_CheckFundInfo" );
 
 if( amount <= 0 ){
  checkInfo = "<font face='宋体' color='#FF0000'>×检测不通过,当前余额"+RTStr+"(元)。不足以支付。</font>";
 }
 else{
  checkInfo = "<font face='宋体' color='#008000'>√检测通过,当前余额"+RTStr+"(元)。</font>";  
  f.CheckFund.value = "1";
 }
 oDIV_CheckFundInfo.style.display = "block";
 oDIV_CheckFundInfo.innerHTML = checkInfo;
 
}

 

 

 

 

//

Sub Initialize

 Dim session As New notessession
 Dim db As notesdatabase
 Dim view As notesview
 Dim PFDoc As notesdocument    '公司现金总计文档
 Dim ResponseText As String
 
 ResponseText = ""
 Set db = session.CurrentDatabase
 
 Set view = db.GetView( "($PublicFundDoc)" )
 Set PFDoc = view.GetFirstDocument
 If Not PFDoc Is Nothing Then
  ResponseText = PFDoc.Total(0)
 End If 
 Print |Content-Type: text/xml
 <?xml version="1.0" encoding="GBK"?>
 <result>
  <resultMsg>|+ResponseText+|</resultMsg>    
 </result>
  |
 
End Sub

 

原创粉丝点击