Skip to main content
/*Form*/ /*form captcha*/ function checkRecaptcha() { var $reCaptcha = grecaptcha.getResponse(); if ($reCaptcha.length > 0) { document.getElementById("g-recaptcha-error").innerHTML = ""; return true; } else { document.getElementById("g-recaptcha-error").innerHTML = '

Please verify that you are not a robot.

'; return false; } } $("#partnership-form").validate({ errorElement: "span", errorPlacement: function (error, element) { error.insertBefore(element.parent(".input-group")); }, errorLabelContainer: "#form-error", submitHandler: function submitForm() { checkRecaptcha(); if (grecaptcha.getResponse().length > 0) { var $capResponse = grecaptcha.getResponse(); $.ajax({ type: "POST", url: "https://www.athabascau.ca/scripts/university-relations/secondary/research/contact-research.php", dataType: "html", data: $("#partnership-form").serialize() + "&captcha=" + $capResponse, success: function (response) { $("form").fadeOut("slow", function () { $("#thank-you").fadeIn("fast"); $("html, body").animate( { scrollTop: $("#thank-you").offset().top - 200, }, 300 ); }); }, error: function (exception) { console.log(exception); } }); } return false; } });