WordPress.org

Ready to get started?Download WordPress

Forums

WP Captcha-Free
Problem in JS script (2 posts)

  1. n4r.c0m
    Member
    Posted 2 years ago #

    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/

  2. n4r.c0m
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic