Skip to main content
/*Contact form*/ /*show additional form option if Program and course advising is selected in form*/ $("#support-request").change(function () { if ($("#support-request option:selected").val() === "Program and course advising") { $("#advising-options").slideDown(); } else { $("#advising-options").slideUp(); $("#advising-options input:radio").attr('checked', false); } }); /*show tutoring and learning alert if Course-related questions is selected in form*/ $("#support-request").change(function () { if ($("#support-request option:selected").val() === "Course-related questions") { $("#learning-support-alert").slideDown(); } else { $("#learning-support-alert").slideUp(); } }); /*show Homewood Health message if Mental health and wellness is selected in the form*/ /*$("#support-request").change(function () { if ($("#support-request option:selected").val() === "Mental health and wellness") { $("#homewood-health-alert").slideDown(); } else { $("#homewood-health-alert").slideUp(); } }); */ /*show Carepath message if Mental health and wellness is selected in the form*/ $("#support-request").change(function () { if ($("#support-request option:selected").val() === "Mental health and wellness") { $("#carepath-alert").slideDown(); } else { $("#carepath-alert").slideUp(); } }); $("#support-request").change(function () { if ($("#support-request option:selected").val() === "Technical support") { $("#technical-support-inputs").slideDown(); } else { $("#technical-support-inputs").slideUp(); } }); $.ajax({ url: 'https://www.athabascau.ca/scripts/university-relations/mainsite/contact/current-time.php', type: 'POST', data: {}, success: function (response) { $("#athabasca-current-time").html(response); $.getScript("https://www.athabascau.ca/framework/v1/theme/js/vendor/jquery-autocomplete-min.js"); }, error: function (e) { console.log(e); } }); /*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; } } $("#contact-support-services").validate({ errorElement: "span", errorPlacement: function (error, element) { error.insertBefore(element.parent(".input-group, .checkbox, .radio-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/support-services/contact-support-services.php", dataType: "html", data: $("#contact-support-services").serialize() + "&captcha=" + $capResponse, success: function (response) { $("form").fadeOut("slow", function () { $("#thank-you").fadeIn("fast"); }); }, error: function (exception) { console.log(exception); } }); } return false; } });