Loading XML file data in Select2 with jQuery AJAX and PHP

Autocomplete search makes it easier to find an item from the long list of available items.

It displays suggestions based on the typed searched text.

If your data available in XML format then also you can use it for autocomplete searching.

With the use of XPath navigate on the XML data node and search the value.

In this tutorial, I am using the select2 plugin for autocomplete data with jQuery AJAX.

Loading XML file data in select2 with jQuery AJAX and PHP

Read more

Loading data remotely in Select2 with AJAX

Select2 is a jQuery plugin that extends the functionality of a simple HTML drop-down element by allowing to search the list, add the image with options, navigate to the option with arrow keys, etc.

It comes with AJAX support which you can call it in the same way as $.ajax in jQuery. This allows you to fetch options from the server when the user clicks on the select element or searches for a value in the search box.

In this tutorial, I show how you load MySQL database data remotely in Select2 with AJAX.

Loading data remotely in Select2 with AJAX

Read more