Results 1 to 1 of 1
Thread: Blocking Spam With Javascript
-
10-07-2011, 10:14 AM #1
Freshman
- Join Date
- Aug 2011
- Posts
- 16
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Feedback Score
- 0
Blocking Spam With Javascript
Hi all,
Coder Will Bontrager (willmaster.com) shared this spam busting tip with me, and I thought you might find it useful.
---------------
One of the easiest form spam reduction techniques is to put a URL in the form's action tag that goes to a regular page instead of the form handling script - a real page, not a 404, so spammers don't get notified to manually investigate your code.
Somewhere below the form, JavaScript assigns the correct URL to the action tag.
The form tag needs an id value for the JavaScript to use. Example:
<form id="handle" action="/index.html"> ... </form>
<script type="text/javascript"> document.getElementById("handle").action = "/script.php"; </script>
Spammers' robots seldom parse JavaScript, so their automated submission never reaches the form handler specified by the JavaScript.
Instead, their spam goes poof at the URL hard coded into the form tag.
Similar Threads
-
Avoid IP blocking
By Kenos in forum Computer and TechReplies: 33Last Post: 02-03-2012, 02:29 AM -
CAN-SPAM Compliance: What Is CAN-SPAM & Why Does It Matter?
By Sabrina Gage in forum ServicesReplies: 0Last Post: 04-11-2011, 05:51 AM -
Is there a method in blocking website traffic that you don’t really want?
By mickdonald37 in forum Search Engine OptimizationReplies: 6Last Post: 12-16-2010, 06:32 AM -
Blocking geographical regions from your site?
By numberone in forum Web HostingReplies: 0Last Post: 02-12-2010, 09:56 PM -
Is Microsoft blocking ads?
By himoacs in forum MicrosoftReplies: 6Last Post: 08-29-2008, 07:00 PM


Reply With Quote

