Forums

[resolved] [Plugin: WP-reCAPTCHA] Javascript Console / Firebug Shows Error (2 posts)

  1. saphod
    Member
    Posted 1 year ago #

    Although the reCaptcha plugin works well (2.9.1), I get a JavaScript error in Firefox 3. Firebug shows the following error: "sub is null".

    The source code is:

    var sub = document.getElementById('submit');
    sub.parentNode.removeChild(sub);

    I don't know why this error happens... maybe because "submit" is not a unique name or it is defined AFTER the script?

  2. saphod
    Member
    Posted 1 year ago #

    OK, problem solved.

    Actually, the call to the 'comment_form' hook in my template was BEFORE the "Submit"-Button, therefore the ID 'submit' wasn't even initialized when the JavaScript called it - hence it was NULL.

    I have adapted my comments-php (rather than the plugin), and it works fine now - no JavaScript error any longer.

Topic Closed

This topic has been closed to new replies.

About this Topic