Wednesday August 06, 2008
TOTD #40: jQuery Autcomplete widget with MySQL, GlassFish, NetBeans
TOTD
#39 explained how to create an Autocomplete widget
(server-powered autocompleting of text fields, similar to Google
Suggest) using Prototype/Script.aculo.us libraries
with NetBeans, GlassFish and MySQL. This Tip Of The Day (TOTD) builds
upon that project and shows how same functionality can be achieved
using jQuery
Library.
|
<script src="javascripts/jquery-1.2.6.min.js"
type="text/javascript"></script> <script type="text/javascript"> function autocomplete(autocomplete) { if (autocomplete.length == 0) { $('#autocomplete_choices').hide(); } else { $.post("/Autocomplete/StatesServlet", { autocomplete_parameter: "" + autocomplete + ""}, function(data) { if (data.length > 0) { $('#autocomplete_choices').show(); $('#autocomplete_choices').html(data); } }); } } </script> |


Posted by Arun Gupta in web2.0 | Comments[0]
|
|
|
|
|
Today's Page Hits: 5072
Total # blog entries: 1002