|
|
Registered tutorials: 501 Registered Users: 32540
|
|
Rating: 3.8 out of 5 votes cast
Category: Technique Introduction
|
AJAX Suggest Tutorial
Abstract: This tutorial is extreamly simple, thus is a great place to start if you are unfamiliar with AJAX technologies. The tutorial consists of a HTML page for presenting the suggest searchbox, a JavaScript file for handling the AJAX functionality
Suggest is one of the better AJAX patterns that I have run across. It certainly can make a site much more user friendly in implemented properly. What we will be creating probably won't be that useful, but it will give you a good understanding of how to implement a robust version on your own site.
This tutorial is extreamly simple, thus is a great place to start if you are unfamiliar with AJAX technologies. The tutorial consists of a HTML page for presenting the suggest searchbox, a JavaScript file for handling the AJAX functionality, and a simple server-side PHP page that returns a new-line seperated list of suggested searches.
The suggestions returned from the server are based on my page titles. In a real implemetation, you would probably want to make this more robust to suggest searches that other users have looked for in the past.
The database structure for this tutorial is going to consist of two simple columns: suggest_id and title. All we really need is the title, but I always provide a primary key for any table that I create.
CREATE TABLE `suggest` ( `suggest_id` INT(11) NOT NULL AUTO_INCREMENT, `title` VARCHAR(255) DEFAULT NULL, PRIMARY KEY (`suggest_id`) )
|
Reviews:
Rate and Review This Site
No reviews yet
Statistic Information About this Resource:
| Total Hits: |
687 |
| Unique Hits: |
596 |
| |
Daily |
Weekly |
Monthly |
| |
Unique |
Total |
Unique |
Total |
Unique |
Total |
| Average |
1.2 |
1.3 |
6.1 |
6.9 |
25.1 |
27.7 |
| Current |
0 |
0 |
7 |
7 |
30 |
33 |
| Previous |
2 |
2 |
0 |
0 |
36 |
41 |
| Nov 19 |
1 |
1 |
11 |
12 |
35 |
39 |
| Nov 18 |
4 |
4 |
0 |
0 |
29 |
31 |
| Nov 17 |
0 |
0 |
11 |
13 |
23 |
25 |
| Nov 16 |
1 |
1 |
0 |
0 |
25 |
29 |
| Nov 15 |
3 |
4 |
11 |
11 |
0 |
0 |
| Nov 14 |
1 |
1 |
8 |
8 |
20 |
22 |
| Nov 13 |
0 |
0 |
10 |
15 |
31 |
32 |
| Nov 12 |
0 |
0 |
3 |
3 |
22 |
25 |
| Highest |
7 |
8 |
14 |
17 |
48 |
61 |
|
|
|
Script Execution Time: 0.21781 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2
|