0

I have two pages and two captcha respectively. One captcha is loaded on refresh and second captcha is loaded on second page when second page is loaded with ajax. On second page I have two button YES and No, if I am clicking on No, my captcha should be reset and for that i have used

grecaptcha.reset();

but nothing is happening.

My code on No button read like this

$(document).on("click","#nt_btncontent .none_btn",function(){
        grecaptcha.reset();
});
Rob
  • 2,243
  • 4
  • 29
  • 40

1 Answers1

0

try this answers g-captcha js callback render. https://stackoverflow.com/a/41472908/6694697

and now at handle enter code here

recaptcha1.reset();

or

recaptcha2.reset();
Qh0stM4N
  • 182
  • 1
  • 9
  • I am getting this ReferenceError: recaptcha1 is not defined –  Oct 30 '17 at 10:35
  • once I declare these variables, it is showing TypeError: recaptcha1.reset is not a function –  Oct 30 '17 at 10:43