Web Global Net Web Application & Web Development Project Center

Technical Issues => Google Related => Topic started by: admin on June 06, 2020, 01:44: PM

Title: google recaptcha - Not a Robot
Post by: admin on June 06, 2020, 01:44: PM
 Just copy and add red & blue code

 Add this before end of head tag

<script type="text/javascript" src="https://www.google.com/recaptcha/api.js"></script>
          <script type="text/javascript">
      var onloadCallback = function() {
        grecaptcha.render('html_element', {
          'sitekey' : 'YOUR SITE KEY'


Next add this after form tag

                     <div id="dmxReCaptcha2" class="g-recaptcha" data-sitekey="YOUR SITE KEY"></div>
                      <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit"
        async defer>

Next add this after html tag

<script type="text/javascript">
   function my_button_click_handler() {

   var recaptcha = $("#g-recaptcha-response").val();
   if (recaptcha === "") {
      alert("Please check the recaptcha");
      return false;
   return true;

Thats it