document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln(" "); document.writeln("
*Your Name:
*E-mail:
Phone:
Company:
*Title:
*Content:
"); document.writeln("
"); document.writeln("
"); function FixJqText(str) { var tempstr = str.replace(/\+/g, "+"); return tempstr; } $.fn.formreset = function () { $(this).each(function () { this.reset(); }); $("#msg").text(""); } $("#ImgSend").click(function () { var vRealName = $.trim($("#SubmitName").val()); if (vRealName == "") { alert("Please enter your name!"); $("#SubmitName").focus(); return false; } var vEmail = $.trim($("#SubmitEmail").val()); if (vEmail == "") { alert("Please enter your email!"); $("#SubmitEmail").focus(); return false; } var mail_filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (!mail_filter.test(vEmail)) { alert("Please enter a valid email format"); $("#SubmitEmail").focus(); return false; } var vTitle = $.trim($("#SubmitTitle").val()); if (vTitle == "") { alert("Please enter the Title!"); $("#SubmitTitle").focus(); return false; } var vContent = $.trim($("#SubmitContent").val()); if (vContent == "") { alert("Please enter the content!"); $("#SubmitContent").focus(); return false; } $(this).attr("disabled", "disabled"); $("#msg").text("Is being submitted..."); $.ajax({ type: "POST", url: "/OutOpen/AddInquiry", data: { name: escape(FixJqText(vRealName)), company: escape(FixJqText($("#SubmitCompanyName").val())), siteLangId: vSiteLangId, ipAddress: vIpAddress, proId: $("#productID").val(), phone: $("#SubmitPhone").val(), email: vEmail, title: escape(FixJqText(vTitle)), content: escape(FixJqText(vContent)), pageUrl: document.URL }, dataType: "json", error: function (XMLHttpRequest, textStatus, errorThrown) { //alert(XMLHttpRequest.status); //alert(XMLHttpRequest.readyState); //alert(textStatus); alert('Send failed, please re submit!'); $("#ImgSend").removeAttr("disabled"); }, success: function (data) { $("#ImgSend").removeAttr("disabled"); alert('Sent successfully, we will contact you soon!'); $("#feedbackForm").formreset(); }, async: false }); return false; });