good day
The problem is that if the script with the callback function for reCaptcha is in the same html where this reCaptcha is inserted, then the callback is triggered, and when the script is moved to an external file, it is not (the other functions of the script are performed as necessary)
#feedback.html.haml ... .row = recaptcha_tags :callback => "re_check" ... #script.js $(function(){ ... function re_check(){ if ((name_f.value == "")|| (phone_f.value == "")){ show_error(); } validate(); } ... }) How to fix?
Posted on September 1
The problem was not that the script is in an external file, but that it is wrapped in $ (function () {}). Not yet figured out how to fix