").html("").text());$("#phonenumberid").val();$("#enquirysubmitid").click(function(){var n=$("#fullname").val(),r=$("#email").val(),t=$("#phonenumberid").val(),e=$("#commentsid").val(),o=document.getElementById("fullname-error-msg"),s=document.getElementById("email-error-msg"),h=document.getElementById("phonenumber-error-msg"),i=document.getElementById("email-valid-error-msg"),u=document.getElementById("email"),f;if(o.innerText=n===""?"First name is required.":"",s.innerText=r===""?"Email is required.":"",h.innerText=t===""?"Phone number is required.":"",n!==""&&r!==""&&t!==""){const u=document.getElementById("email"),r=u.value;if(i=document.getElementById("email-valid-error-msg"),u.checkValidity())i.innerText="";else{i.innerText="Please enter a valid email address.";return}f={fullname:n,email:r,phonenumber:t,comments:e,productId:711};$.ajax({cache:!1,type:"Post",url:"/DueDiligenceDownload/SavePropertyEnquiry",data:f,success:function(n){n.success==!0?alert("Your enquiry is submitted successfully."):alert("You cannot submit a enquiry to your own property.")},error:function(){alert("Something went wrong, please try again.")}})}})});$("#email").change(function(){validateEmail()})