Skip to main content
/*Web feedback form*/ /*Display captcha warning message */ 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; } } $("#technical_problems_form").validate({ errorElement: "span", errorPlacement: function (error, element) { error.insertBefore(element.parent('.input-group, .checkbox, .radio-group')); }, errorLabelContainer: "#form-error", submitHandler: function submitForm() { if (grecaptcha.getResponse().length > 0) { var $capResponse = grecaptcha.getResponse(); $.ajax({ type: 'POST', url: 'https://library.dev.athabascau.cloud/action/techsupport.php', dataType: 'html', data: $("#technical_problems_form").serialize()+ "&captcha=" + $capResponse, success: function (response) { $("form").fadeOut("slow", function () { $("#thank-you").fadeIn("fast"); }); }, error: function (exception) { console.log(exception); } }); } checkRecaptcha(); return false; }, });