D
D
Daniil Shmygol2018-09-19 15:05:49
JavaScript
Daniil Shmygol, 2018-09-19 15:05:49

Code stops working on Recaptche, what should I do?

There is such a script

<script type="text/javascript">


function myfunc() {
  
  if (document.getElementById('mygal').checked && document.getElementById('send-msg').click) {
    event.preventDefault();
    grecaptcha.execute(); 
    document.getElementById('my_form').submit
    }
    
  }


</script>

Which, in fact, should call the captcha and continue working after it is processed, but nothing happens after the captcha, what is my mistake?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2018-09-19
@etozhekqx

If memory serves, then .submitthis is a method, not a property. Those. need like this:
document.getElementById('my_form').submit();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question