I use Google reCAPTCHA on my website and I am having trouble calling the callback function. After the user successfully passed captcha, I want to call the function. I use a div with these attributes to display captcha:
class='g-recaptcha' data-sitekey='keyhere' data-callback='alert(1);'
However, I canβt get it to alert(1);start, nothing happens when I fill in the captcha. Everything else about captcha works fine, I just can't get it to call a function. What can i do wrong?
alert(1);
, , , , , , , data-callback , script :
data-callback
class='g-recaptcha' data-callback='doSomething' function doSomething() { alert(1); }