function checkcomment(theform)
{
if (trim(theform.ProductImg.value)=='')
{alert('不能为空');
theform.ProductImg.focus();
theform.ProductImg.value='';
return false
}
if (trim(theform.ProductName.value)=='')
{alert('不能为空');
theform.ProductName.focus();
theform.ProductName.value='';
return false
}
if (trim(theform.YourTargetUnit.value)=='')
{alert('不能为空');
theform.YourTargetUnit.focus();
theform.YourTargetUnit.value='';
return false
}
if (trim(theform.OrderQuantity.value)=='')
{alert('不能为空');
theform.OrderQuantity.focus();
theform.OrderQuantity.value='';
return false
}
if (trim(theform.YourName.value)=='')
{alert('不能为空');
theform.YourName.focus();
theform.YourName.value='';
return false
}
if (trim(theform.email.value)=='')
{alert('不能为空');
theform.email.focus();
theform.email.value='';
return false
}
if (trim(theform.YourTelephone.value)=='')
{alert('不能为空');
theform.YourTelephone.focus();
theform.YourTelephone.value='';
return false
}
if (trim(theform.CompanyName.value)=='')
{alert('不能为空');
theform.CompanyName.focus();
theform.CompanyName.value='';
return false
}
if (trim(theform.Country.value)=='')
{alert('不能为空');
theform.Country.focus();
theform.Country.value='';
return false
}
if (trim(theform.Postscript.value)=='')
{alert('不能为空');
theform.Postscript.focus();
theform.Postscript.value='';
return false
}
var param;
param=webdir+"plug/liuyan.asp?action=save";
param+="&ProductImg="+escape(trim(theform.ProductImg.value));
param+="&ProductName="+escape(trim(theform.ProductName.value));
param+="&YourTargetUnit="+escape(trim(theform.YourTargetUnit.value));
param+="&OrderQuantity="+escape(trim(theform.OrderQuantity.value));
param+="&YourName="+escape(trim(theform.YourName.value));
param+="&email="+escape(trim(theform.email.value));
param+="&YourTelephone="+escape(trim(theform.YourTelephone.value));
param+="&CompanyName="+escape(trim(theform.CompanyName.value));
param+="&Country="+escape(trim(theform.Country.value));
param+="&Postscript="+escape(trim(theform.Postscript.value));
param+="&id="+escape(trim(theform.id.value));
$('#showmsg').html("<img src="+webdir+"skins/2009/images/loading.gif>");
$.ajax({
type:"get",
cache:false,
url:param,
timeout:20000,
error:function(){$('#showmsg').html(Ajax_msg);},
success:function(t0)
{
$('#showmsg').html(t0.substring(1));
if(t0.substring(0,1)==0){theform.ProductImg.value='';theform.ProductName.value='';theform.YourTargetUnit.value='';theform.OrderQuantity.value='';theform.YourName.value='';theform.email.value='';theform.YourTelephone.value='';theform.CompanyName.value='';theform.Country.value='';theform.Postscript.value='';get_comment(theform.id.value,'show_i_commentnum');load_comment(theform.id.value,'comment_list');}
}
});
return false
}