//var url = http://detail.b2b.hc360.com/detail/turbine/action/sendbusnote.SendBusnoteAction/eventsubmit_dosendbusnote/doSendbusnote;
//var url = http://detail.b2b.hc360.com/detail/turbine/template/shop%2Casync%2Cbusnoteresult.html;
var url = http://b2b.hc360.com/action/shop,async,busnoteresult.html;
function sendIsOnline(){
var content=document.getElementById(busnotecontent).value;
var vaildcode=document.getElementById("vaildcode").value;
var LoginTicket=document.getElementById("LoginTicket").value;
if(content==""){
alert("请填写留言内容!");
return false;
}
if (content.length>2000){
alert("留言内容不能超过2000个字!");
return false;
}
if (vaildcode==""){
alert("请填写验证码!");
return false;
}
if (vaildcode.length!=4){
alert("请正确填写4位验证码!");
return false;
}
var myAjax = new Ajax.Request( url, {
method: post,
parameters: {validcode:vaildcode,content:content,sendcontacter:范柏成,corname:昆山重强装饰建材有限公司,
email:791594043@qq.com,tel:86-0512-55537668,infoid:63947461,infotype:0,recvproviderid:100010095700,sendproviderid:100010095700,title:供应轻钢龙骨苏州众成装饰建材承接厂房办公楼超市门面房等装修业,
LoginTicket:LoginTicket},
onComplete: function(req){
ret=req.responseXML;
parxmlrs(ret);
},
onException:function(e){alert(系统故障暂时无法返回正确结果,请您稍后再试试);}
});
}
function sendNotOnline(){
var vaildcode=document.getElementById("vaildcode").value;
var content=document.getElementById(busnotecontent).value;
var sendcontacter = document.getElementById(busnoteyourname).value;
var corname = document.getElementById(busnotecorname).value;
var email = document.getElementById(busnoteemail).value;
var tel = document.getElementById(busnotetel).value;
var LoginTicket=document.getElementById("LoginTicket").value;
if(sendcontacter==""){
alert("请输入您的姓名!");
return false;
}
if(sendcontacter.length>31){
alert("您输入的姓名太长,请不要超过30个字!");
return false;
}
if(corname.length>51){
alert("您输入的公司名称太长,请不要超过50个字!");
return false;
}
if(email==""){
alert("请输入您的电子邮件!");
return false;
}
if(email.length>51){
alert("您输入的Email太长,请不要超过50个字!");
return false;
}
if(content==""){
alert("请填写留言内容!");
return false;
}
if (content.length>2000){
alert("留言内容不能超过2000个字!");
return false;
}
if (vaildcode==""){
alert("请填写验证码!");
return false;
}
if (vaildcode.length!=4){
alert("请正确填写4位验证码!");
return false;
}
var myAjax = new Ajax.Request( url, {
method: post,
parameters: {validcode:vaildcode,content:content,sendcontacter:sendcontacter,corname:corname,
email:email,tel:tel,infoid:63947461,infotype:0,recvproviderid:100010095700,sendproviderid:0,title:供应轻钢龙骨苏州众成装饰建材承接厂房办公楼超市门面房等装修业,
LoginTicket:LoginTicket},
onComplete: function(req){
ret=req.responseXML;
parxmlrs(ret);
},
onException:function(e){alert(系统故障暂时无法返回正确结果,请您稍后再试试+e);}
});
}
function parxmlrs(obj){
var busnoters=obj.getElementsByTagName(busnoteresult);
var tckey = busnoters[0].getElementsByTagName(key)[0].firstChild.data;
var tcvalue = busnoters[0].getElementsByTagName(value)[0].firstChild.data;
var status = busnoters[0].getElementsByTagName(status)[0].firstChild.data;
var returninfo = busnoters[0].getElementsByTagName(returninfo)[0].firstChild.data;
if(status == 1){
document.getElementById("vaildcode").value="";
document.getElementById(busnotecontent).value="";
document.getElementById(LoginTicket).value = tckey;
var newsrc = http://my.b2b.hc360.com/my/ValidImage.jsp?Seed=+tcvalue;
document.getElementById(validimg).src = newsrc;
alert("发送留言成功");
}
else{
document.getElementById("vaildcode").value="";
document.getElementById(LoginTicket).value = tckey;
var newsrc = http://my.b2b.hc360.com/my/ValidImage.jsp?Seed=+tcvalue;
document.getElementById(validimg).src = newsrc;
alert(returninfo);
}
}