I think I got it resolved ...
But I really cannot understand why this happened.
The code was working fine for last few months.
code on which i was getting error
============== ============
//at this point ajax returns value to say recaptcha wrong
alert("The Captcha value you entered is incorrect. Please try again.");
document.getElementById("recaptcha_response_field").focus();
Recaptcha.reload(); // this is the line I was getting error on
=================================
Fixed code which is working
=========================================
//at this point ajax returns value to say recaptcha wrong
alert("The Captcha value you entered is incorrect. Please try again.");
document.getElementById("recaptcha_response_field").focus();
reloadRecaptcha(); // created a used defined function instead of Recaptcha.reload(); code for that is gvn below.
===========================================
User defined javascript function created to use instead of Recaptcha.reload();
============================================
function reloadRecaptcha() {
var publicKey = "6LcHMvESeeeeeeeeeeeeeeeeeeeeeeeeeeAAAAw5Gslz"; // not my real key just for example. put your public key here
var div = "recap_box"; // div id inside which recaptcha works
Recaptcha.create(publicKey,div,{theme: "clean"}); // clean is recaptha theme type i use you may use red or other as per your liking.
return false;
}
============================================
The fixed my problem.
The strange thing is Recaptcha.reload(); is working in my code if not used after an ajax return ?? absurd ....
Please update this thread in case any of you guys find what the problem really is and any other fixes.