<script language="javascript" for="RE_REPAIR_SITE" event="onblur">
{
return GetHore();
}
]]>
</script>
<script>
function GetHore()
{
if(document.all("RE_REPAIR_SITE").value != "")
{
var xml = "<?xml version='1.0' encoding='UTF-8'?>"+
"<Ebanswers>"+
"<SITE>"+
"<SITE_NO>" + document.all("RE_REPAIR_SITE").value + "</SITE_NO>"+
"</SITE>"+
"</Ebanswers>";
var outHtml = XmlHttpPost("../Library/WebInitPage.aspx?Source=GetHore", xml);
//alert(outHtml);
if(outHtml != "")
{
try{
var partHore = Number(outHtml.substr(0,outHtml.indexOf(",")));
if(partHore != 0 )
{
document.all("RE_PART_FEE").value= partHore
}
var feeHore = Number(outHtml.substr(outHtml.indexOf(",")+1));
if(feeHore != 0 )
{
document.all.RE_FEE.value = feeHore
}
}
catch(e)
{
}
}
}
}
一些基础函数:
function XmlHttpPost(webFile, sendXml) {
var xmlHttp = GetXmlHttp();
xmlHttp.Open("POST", webFile, false);
xmlHttp.SetRequestHeader("Content-Type","text/xml; charset=utf-8");
xmlHttp.Send(sendXml);
return xmlHttp.responseText;
}
function GetXmlHttp() {
if (XmlVersion == -1)
CheckXmlVersion();
if (XmlVersion == 4)
return new ActiveXObject("MSXML2.XMLHTTP.4.0");
return new ActiveXObject("MSXML2.XMLHTTP.3.0");
}
var XmlVersion = -1;
//------------------------------------------------
function CheckXmlVersion() {
XmlVersion = 4;
try {
xmldom = new ActiveXObject("MSXML2.DOMDocument.4.0");
} catch (e) {
XmlVersion = 3;
}
return 0;
}
{
return GetHore();
}
]]>
</script>
<script>
function GetHore()
{
if(document.all("RE_REPAIR_SITE").value != "")
{
var xml = "<?xml version='1.0' encoding='UTF-8'?>"+
"<Ebanswers>"+
"<SITE>"+
"<SITE_NO>" + document.all("RE_REPAIR_SITE").value + "</SITE_NO>"+
"</SITE>"+
"</Ebanswers>";
var outHtml = XmlHttpPost("../Library/WebInitPage.aspx?Source=GetHore", xml);
//alert(outHtml);
if(outHtml != "")
{
try{
var partHore = Number(outHtml.substr(0,outHtml.indexOf(",")));
if(partHore != 0 )
{
document.all("RE_PART_FEE").value= partHore
}
var feeHore = Number(outHtml.substr(outHtml.indexOf(",")+1));
if(feeHore != 0 )
{
document.all.RE_FEE.value = feeHore
}
}
catch(e)
{
}
}
}
}
一些基础函数:
function XmlHttpPost(webFile, sendXml) {
var xmlHttp = GetXmlHttp();
xmlHttp.Open("POST", webFile, false);
xmlHttp.SetRequestHeader("Content-Type","text/xml; charset=utf-8");
xmlHttp.Send(sendXml);
return xmlHttp.responseText;
}
function GetXmlHttp() {
if (XmlVersion == -1)
CheckXmlVersion();
if (XmlVersion == 4)
return new ActiveXObject("MSXML2.XMLHTTP.4.0");
return new ActiveXObject("MSXML2.XMLHTTP.3.0");
}
var XmlVersion = -1;
//------------------------------------------------
function CheckXmlVersion() {
XmlVersion = 4;
try {
xmldom = new ActiveXObject("MSXML2.DOMDocument.4.0");
} catch (e) {
XmlVersion = 3;
}
return 0;
}