AJAX Suggestion Text Box 
AJAX Auto Complete Text Box Using JSP JAVA

The latest Websites uses AJAX for user friendly. 
Text box Auto Complete is latest trend to display the typing word as dropdown.
 Example google shows the drop down.
How to create Suggestion Box?
Its simple because if you gonna use jQuery then it takes little time. However you need the Business logic to work on Database. 
You have to configure your coding structure for connecting to Database. Whenever user types a letter in the Text box then using onkeyup event in javascript have to ping up the Database. Using like statement in Database have to retrieve the value and display it in View part i mean in JSP.

Description

The AutoSuggest class adds a pulldown menu of suggested values to a text field. The user can either click directly on a suggestion to enter it into the field, or navigate the list using the up and down arrow keys, selecting a value using the enter key. The values for the suggestion list are to provided as XML, or as JSON (by a PHP script, or similar).
The results of the first request are cached on the client machine and are filtered as the user continues to type, to reduce the number of requests hitting the server.
In the JSON example above a callback function is passed to the autoSuggest instance. It is called when the user selects an entry, and inserts the entry id into a hidden field (visible for this example).
In the XML example below supplementary information is being displayed along with the names, in this case an english county.

Example for AJAX Suggestion Box:

Visit TutorialsFree.net


0 comments