Address

Bhaji

73 Newbottle Street
Houghton le Spring DH4 4AR "> function validateEmail(email) { var re = /\[email protected]\S+\.\S+/; return re.test(email); } $(document).ready(function () { $("#submit_btn").click(function (e) { e.preventDefault(); var TextVal = 0; $(".textbox").each(function () { $(this).css("border", "1px solid #cccccc"); if ($(this).val().length == 0) { TextVal = 1; $(this).css("border", "1px solid #900000"); } }); if (TextVal == 0) { var email = $("#email_address").val(); // alert(validateEmail(email)); if (!validateEmail(email)) { $(".errorDiv").html("E-mail is not valid."); } else { var url = 'https://bhajihoughton.co.uk/site/email'; var data = $("#email_form").serialize(); $.post(url, data, function (resp) { if (resp == "DONE") { $(".errorDiv").html("Successfully sent your E-mail."); $("#email_form").hide(); } else { $(".errorDiv").html(resp); } }); } } }); });

Developed By