jQuery: Auto-suggest with keyup() event

Posted by Jetlogs @ 4:59 pm
Category: jQuery

Due to a request from a friend, here is a tutorial on how to do an auto-suggest script using jQuery and the keyup() event. The program logic of this script is based on the AJAX suggest script from w3schools but with some improvements on the efficiency, ease of use and customization by using jQuery.

The basic logic of an auto-suggest script is that for every keystroke that a user enters on a textfield, the script must send an AJAX request and validate which words in a dictionary most closely resembles the current input. Read more »


jQuery: Textbox Validation and the blur() Event

Posted by Jetlogs @ 12:06 am
Category: jQuery,Web Development

Here is another jQuery tutorial demonstrating how to perform text validations using jQuery’s blur() event.

Its a fact that client-side client validation is no alternative to server-side validation especially in web applications. However, that doesn’t mean that we should drop client-side validation altogether. The truth is that client-side validation enhances a web application. First, the client-side validations provide a more responsive interface for users. Secondly, for a very large enterprise-grade application, shifting some of the validations on the client as a first pass filter will reduce the load on the server and improve its performance.

Now let’s move on to the tutorial. First of all, I’m going to use a simple registration form as an example for validation. Here is the demo for this tutorial:

Username: Username must be at least 4 characters in length

Password: Password must be at least 6 characters in length

Read more »


jQuery: Select Boxes and change() events

Posted by Jetlogs @ 4:53 pm
Category: jQuery,Web Development

Here is a very simple jQuery trick to display a message depending on which option is currently selected on a select box. This is very useful especially when there is a need for an explanation or give additional information on some items within a select box.

Here is a demo of this tutorial at work:

Quite handy isn’t it? Here is how to do it in a few simple steps: Read more »


jQuery: Select All Checkbox

Posted by Jetlogs @ 11:52 pm
Category: jQuery,Web Development

Note: [@attr] selectors are no longer supported by jQuery 1.3.x and above. Use [attr] instead

Here is a simple tutorial on how to implement the “select all” function for checkboxes in jQuery. All you need to know for this tutorial is the basic knowledge of using the jQuery library.

assuming we have included the jQuery library in our document:


<script type="text/javascript" src="jquery.js"></script>

The next step would be Read more »


jQuery: Input Validation with Form Plugin

Posted by Jetlogs @ 1:26 am
Category: jQuery,Web Development

In this next tutorial, I will demonstrate how to perform input validation on AJAX forms using the jQuery form plugin.

The requirements for this tutorial are:

  • Basic knowledge of jQuery
  • Basic knowledge of jQuery form plugin usage
  • Basic knowledge of javascript
  • and the required files for this tutorial are:

  • jQuery library
  • jQuery form plugin
  • Before we start with this tutorial, let me make one thing clear:

    Client-side input validation is no substitute for server-side validation.
    Client-side validation can be easily bypassed, and should be treated more as an enhancement for the form.

    now let us continue with the tutorial Read more »


    « Previous PageNext Page »
  • Archives

  • Donations

  • Social Bookmarks

  • Jetlogs.org
    Some Rights Reserved 2007
    Creative Commons License