[Plugin: WP-reCAPTCHA] JavaScript error on pages that don't have submit button
-
The function “save_comment_script” needs to be modified in the recaptcha.php page to check for the existence of the id ‘submit’. Otherwise, the getElementById(‘submit’) returns null and the function throws a JavaScript error on the page. I’m using IE8, WordPress 3.1.2, wp-recaptcha version 3.1.3.
Works fine on my comment page where this button exists, but throws the error on any page that does not show the comment form with reCaptcha (and that does not include a ‘submit’ id). Wrapping this code around the lines in the function works for me:
if(document.getElementById(‘submit’) != null)
It was easy enough to manually fix in the plugin code, but it would be great if that check could be added to the main plugin source so that I don’t have to keep remembering to add it in every time I upgrade the plugin.
Thanks!
- The topic ‘[Plugin: WP-reCAPTCHA] JavaScript error on pages that don't have submit button’ is closed to new replies.