Support » Plugin: WP Captcha-Free » [Plugin: WP Captcha-Free] Problem in JS script

  • Hello.

    I found a little problem in Captcha-free script.
    After storing hash in #captchafree input gothash() function tries to submit a form by this line:
    document.getElementById('submit').click();

    The problem appears if page have another form with #submit button and this form located earlier in HTML than comment form.
    In my case footer have login form, so gothash() function take submit button in login form and successfully .click() it.

    Solution:
    replace
    document.getElementById('submit').click();
    by
    document.getElementById('captchafree').form.submit();

    http://wordpress.org/extend/plugins/wp-captcha-free/

Viewing 1 replies (of 1 total)
  • I’m sorry, there is no submit() method of the form element.
    Use:
    document.getElementById('captchafree').form.submit.click();

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Captcha-Free] Problem in JS script’ is closed to new replies.