Skip to content

Instantly share code, notes, and snippets.

@accrane
Created April 14, 2017 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save accrane/ad33e3d9596d2f663a7c3c6e744895da to your computer and use it in GitHub Desktop.
Save accrane/ad33e3d9596d2f663a7c3c6e744895da to your computer and use it in GitHub Desktop.
rendering the Google Captcha
<script type="text/javascript" language="JavaScript">
// Call to rendor the captcha
var recaptcha1;
var recaptcha2;
var myCallBack = function() {
//Render the recaptcha1 on the element with ID "recaptcha1"
recaptcha1 = grecaptcha.render('recaptcha1', {
//'sitekey' : '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI', //test key
'sitekey' : 'YOUR_SITE_KEY', // production
'theme' : 'light', // can also be dark
'callback' : 'enableBtn1' // function to call when successful verification for button 1
});
//Render the recaptcha2 on the element with ID "recaptcha2"
recaptcha2 = grecaptcha.render('recaptcha2', {
//'sitekey' : '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI', // test key
'sitekey' : 'YOUR_SITE_KEY', // production
'theme' : 'light', // can also be dark
'callback' : 'enableBtn2' // function to call when successful verification for button 2
});
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment