//var url =
'//detail.b2b.hc360.com/detail/turbine/action/sendbusnote.SendBusnoteAction/eventsubmit_dosendbusnote/doSendbusnote';
//var url =
'//detail.b2b.hc360.com/detail/turbine/template/shop%2Casync%2Cbusnoteresult.html';
var url =
'//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:'18603710387@163.com',tel:'86-0186-03710387',infoid:'113271353',infotype:'0',recvproviderid:'100010374876',sendproviderid:'100010374876',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:'113271353',infotype:'0',recvproviderid:'100010374876',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 =
'//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 =
'//my.b2b.hc360.com/my/ValidImage.jsp?Seed='+tcvalue;
document.getElementById('validimg').src = newsrc;
alert(returninfo); } }