Book Image

jQuery 2.0 Development Cookbook

By : Leon Revill
Book Image

jQuery 2.0 Development Cookbook

By: Leon Revill

Overview of this book

Table of Contents (17 chapters)
jQuery 2.0 Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding anti-spam measures


Most web developers will know that if you have a contact form or any kind of web form publically available on your website, there will be web bot submissions and a lot of spam. Most web bots will be thwarted by the JavaScript-only web form we have been creating over the last seven recipes, but with browser automation and web bots becoming ever cleverer, it is still important to add anti-spam measures to your web forms.

Getting ready

Ensure that you have completed the last seven recipes and have the code readily available. Remember that if you would just like to use the code without fully understanding how it works, skip to the end of this chapter, to the How it works... section, to grab it all.

How to do it…

Add simple anti-spam measures to your web form by performing each of the following steps:

  1. Update index.html to have an additional form input under the input labeled Confirm Password as follows:

    <!-- HIDDEN HTML CODE -->
    <div class="input-frame">
       &lt...