Arrow

Works great - one little issue, can you help me fix? | Peter's Custom Anti-Spam for WordPress | Forum

Back to the custom anti-spam plugin page
 
Current User: Guest
Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Works great – one little issue, can you help me fix?

Reply to Post Add a New Topic
UserPost

11:50 am
November 4, 2008


Fizzter

Guest

Hi Peter,

I sent you an e-mail too, but then thought it might benefit to post it here if we get a solution and anyone else has the issue.

I’ve been using the custom-anti-spam image on my site for quite a while. It’s just a small personal site, but I got hit with spam bots for a while and thought I would implement something like this. It was ridiculously difficult to find a simple captcha plugin. I found your’s and it’s been working great.

There is one little issue I’m having with it I was hoping you could help me resolve. When I go to a specific post, in IE7, I always get a “Done, but with errors on page” message, with this error:
Line: 172
Char: 5
Error: Object Required
Code: 0
URL: http://www.fizzworld.org/2008/10/31/its-here/

My website is http://www.fizzworld.org

If you click on a post, you’ll see what I’m talking about. Everything seems to work normal… but that message still bothers me. )

Note that if you then proceed to REFRESH the page, no error comes up!

I’d appreciate your help in fixing this. Thanks!

-Andrew

11:57 am
November 4, 2008


Peter

Admin

posts 732

Hi Andrew,

Sadly, I cannot reproduce this error on IE7. I can think of two possible causes.

It might be the JavaScript, which you can turn off. Try using the “manual insert method” as described here:

http://www.theblog.ca/wp-content/uploads/2007/01/do_action.htm

Or, it might be complaining about the “tabindex” value, which is duplicated by another field on your page. Do a search in the plugin file and change the “tabindex” value to 6.

Otherwise, it might be caused by something outside of the plugin.

12:39 pm
November 4, 2008


Fizzter

Guest

I modified the tabindex values but that didn’t solve it.

It appears to be caused by this block of script:

script language=’JavaScript’ type=’text/javascript’
!–
var urlinput = document.getElementById(”url”);
var submitp = urlinput.parentNode;
var substitution2 = document.getElementById(”secureimgdiv”);
submitp.appendChild(substitution2, urlinput);
// –
/script

4:21 pm
November 4, 2008


Peter

Admin

posts 732

Yup, the manual insert method should definitely solve the problem, then :)

2:07 am
November 5, 2008


Peter

Admin

posts 732

Here's some code that you can use to replace those 4 lines of JavaScript:

var commentinput = document.getElementById("comment");
var submitp = commentinput.parentNode;
var substitution2 = document.getElementById("secureimgdiv");
submitp.insertBefore(substitution2, commentinput);

Basically it attaches the anti-spam code above the comment field (which is always visible), instead of below the URL field (which is usually not visible to logged in users). I'll be adding this code to the next release.

11:24 pm
December 6, 2008


Midwestern City Boy

Guest

I discovered that I needed to make the following modification that I thought you might be interested in. Basically it attaches the image stuff before the containing node that has the textarea rather than the textarea itself. This is required if the textarea has a label like the other fields on the most comment templates. It doesn’t hurt anything if the ris no lable; but is required if there is.

var commentinput = document.getElementById(\\”comment\\”);

// Insert before surrounding 'p' or 'div' not 'textarea'.
commentinput = commentinput.parentNode;

var submitp = commentinput.parentNode;
var substitution2 = document.getElementById(\\”secureimgdiv\\”);
submitp.insertBefore(substitution2, commentinput);

1:07 pm
December 8, 2008


Peter

Admin

posts 732

Good one. Thanks for the tip. I'll incorporate something like that for the next release.

Reply to Post

Reply to Topic:
Works great – one little issue, can you help me fix?

Guest Name (Required):

Guest Email (Required):

HTML Editor
Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
10 + 5