honeypot for css disabled

I have read that the users who have CSS disabled will see the field with the "display: none", and if we write something like "If you see this, leave this form field blank" for them the bot will read it as well and may avoid it.

I was thinking a way to avoid this problem: just hide the honeypot field with an "ap Div" layer so the user won´t see it and I think it won´t be affected by the css disabled. I would be grateful if someone told me if it would work, if it presents other problems and if anyone knows a better solution

Thanks in advance for your time!!



I may have misunderstood you, but I think this 'ap Div' you are referring to is Dreamweaver's way of describing a div with the position: absolute; CSS rule applied to it.

That being the case, if CSS is disabled, then an 'ap Div' will display on the page according to the ordinary flow of the document.

To hide a field, use <input type="hidden" />. But given that you want to hide the field only from the user, use something like this:

<input type="text" id="hEmail" value="" />
window.onload = function (){
   document.getElementById('hEmail').type = 'hidden';

ps. It is recommended to add JavaScript code in included file, not in the body of the page.

Need Your Help

Method to dynamically load java class files

java class reflection dynamic load

What would be a good way to dynamically load java class files so that a program compiled into a jar can read all the class files in a directory and use them, and how can one write the files so that...

Parsing iTunes RSS using ROME for JAVA

java rss itunes rome

I'm trying to parse a podcast rss feed that contains iTunes specific tags. ROME have a module for doing this which works just fine for getting the info for 'Channel' level tags.