7.0

Table Of Contents
8.3 Adding a live search option
This example demonstrates a live search, where you get search results while you type. An event is triggered
when the user presses, and releases a key in the input field. When the event is triggered, a Javacscript
function is executed. The result of this function is used to update a placeholder element on the web page. The
function performs an AJAX request to retrieve the document list from the database. AJAX (Asynchronous
JavaScript and XML) is a method of building interactive applications for the Web that process user requests
immediately.
To install the sample copy the template-storefront_overview.php from the storefront_tree_livesearch folder to
the root of the default skin.
The tree view with a search block.
This sample constists of the following parts:
Store front specific template file (exception file). The template file contains links to external JavaScript
files and some custom HTML code for the search and tree areas.
An php file that retrieves the document list. The result set is used to generate the HTML for the tree.
This file is called by a custom Javascript function in the <head> section of the template file. This
functions calls this php file using an AJAX request.
Objectif Lune Inc. © 2010 57