Answer the question
In order to leave comments, you need to log in
Why doesn't google reCaptcha (Uncaught (in promise) TypeError) work the second time?
When passing the captcha, the following event is triggered:
var onSuccess = function(response) {
...
}
Answer the question
In order to leave comments, you need to log in
maybe someone will come in handy.
create a captcha like this (if the script is loaded simultaneously with the creation of the captcha, then you need to postpone the creation of the captcha for 2-3 seconds):
postpone for three seconds:
setTimeout( function(){
widgetId = grecaptcha.render('recaptchacontainer', {
'sitekey' : 'sitekey'
}) }, 3000);
widgetId = grecaptcha.render('recaptchacontainer', {
'sitekey' : 'sitekey'
}) }
<div id="recaptchacontainer"></div>
var res = grecaptcha.getResponse(widgetId);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question