enable button when reCAPTCHA
Hi,
I am trying o use reCAPTCHA. I have disabled the button on page load and now I want when the reCAPTCHA is verified to enable the button. I tried below button but it';s not enabling the button!
Kindly help..
- <script type='text/javascript'>
- var captchaContainer = null;
- var loadCaptcha = function() {
- captchaContainer = grecaptcha.render('captcha_container', {
- 'sitekey' : '6Lfl9yATAAAAAF1NfR1R5nojGGOIlz7K79NiEoW7',
- 'callback' : function(response)
- {
- // console.log(response);
- document.getElementById('btnForgotPassword').disabled = true;
- }
- });
- };
- </script>
this is the form:
- <form id="frmForgotPassword" name="frmForgotPassword" class="ui-body ui-body-a ui-corner-all">
- <fieldset>
- <div id="divUserID" data-role="fieldcontain">
- <label for="txtUserID">User ID:</label>
- <input type="text" value="" name="txtUserID" id="txtUserID" placeholder="User ID" autocomplete="off" />
- </div>
- <div id="captcha_container"></div>
- <input type="submit" name="btnForgotPassword" id="btnForgotPassword" value="Reset your Password" disabled>
- </fieldset>
- </form>
Thanks,