2

This is my code so far:

<script type="text/javascript">

var widgetId1;
var onloadCallback = function() {

    widgetId1 = grecaptcha.render('le_captcha', {
      'sitekey' : 'xxx',
      'theme' : 'light'
    });
};


function check(){
    alert(grecaptcha.getResponse(widgetId1));
}

function executeMeAfterSuccessfullValidation(){
    alert('user passed');
}
</script>


<button onclick="check()">check if passed</button>

<div id="le_captcha"></div>

I want executeMeAfterSuccessfullValidation to be called after the user successfully validate.

There is nothing in their docs how to do that: https://developers.google.com/recaptcha/docs/display

But I've seen some websites doing it. How?

Thanks in advance

Frank Modica
  • 10,238
  • 3
  • 23
  • 39
Eduard Unruh
  • 985
  • 1
  • 14
  • 35

0 Answers0