+ Reply to Thread
Results 1 to 3 of 3




  

Thread: Blocking Spam With Javascript

      
  1. #1
    I'm New! Forum Engine is on a distinguished road
    Join Date
    August 20, 2011
    Posts
    12
    Rep Power
    1
    Feedback Score
    0

    Default 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.

  2. #2
    I'm New! Rukbat is on a distinguished road
    Join Date
    August 26, 2011
    Location
    Long Island, NY, USA
    Posts
    19
    Rep Power
    1
    Feedback Score
    0

    Default Re: Blocking Spam With Javascript

    It's a lot easier to just use a type="button" instead of a type="submit", then use the onClick of the button to go to a function that submits to the real page - the address of which is generated in pieces by Javascript. Why rewrite the document?

  3. #3
    Grand Masters simplyamazing12 will become famous soon enoughsimplyamazing12 will become famous soon enough
    Join Date
    May 6, 2010
    Posts
    593
    Rep Power
    3
    Feedback Score
    0

    Default Re: Blocking Spam With Javascript

    Most of this spam blocking is done server-side now. The host's server should usually have this built in and this Javascript isn't that necessary in this day and age.
    My Business: Chi Chi Floral [link soon!]

    Web hosting provided by: Myhosting.com

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Blocking proxies....
    By classact in forum Dedicated / VPS Hosting
    Replies: 12
    Last Post: Mar 24th, 2009, 9:49 pm
  2. Detect Affiliate Cookie Blocking
    By undoIT in forum Affiliate Marketing
    Replies: 3
    Last Post: Jan 21st, 2009, 6:29 am
  3. block the spam on ur servers , secure ur server from sending spam
    By sparks man in forum Dedicated / VPS Hosting
    Replies: 4
    Last Post: May 2nd, 2008, 2:38 pm
  4. IP blocking is only making you loose your business
    By servertech in forum Web Hosting
    Replies: 12
    Last Post: Dec 2nd, 2006, 6:41 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
WebTalkForums
WebTalkForums
Recent Forum Threads