I am running into an issue with implementing the reCaptcha control on a contact form.
The following error is thrown on load: Uncaught ReferenceError: Recaptcha is not defined
Here is a partial snippet of the code I am using:
<form role="form" id="ContactMessageForm">
<div class="form-group">
<div id="CaptchaContainer"></div>
</div>
<button type="button" class="btn btn-default" id="ContactMessageSendButton">Send</button>
</form>
<script type="text/javascript" src="/scripts/mail.min.js" defer="defer"></script>
<script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
<script type="text/javascript">
$(document).ready(function () {
/* Initialize reCaptcha Control */
Recaptcha.destroy();
Recaptcha.create('6Lc4V_ASAAAAAMnnwUcaTewH1mlOdylMgAyxb_m6', 'CaptchaContainer', {
theme: 'clean',
callback: Recaptcha.focus_response_field
});
});
</script>
There is most likely a typo in my code, but I am just not seeing it.
You can see the actual error get fired at: http://eat-sleep-code.com/#!/contact