How to load XML data in jQuery UI autocomplete with PHP

jQuery UI autocompletes enable a textbox to show a suggestion list based on the input.

It allows the loading of suggestion list using AJAX.

AJAX response must be in a defined format otherwise, the list wouldn’t show.

You can load XML data if available.

In this tutorial, I show how you can load XML file data in jQuery UI autocomplete using AJAX and PHP.

How to load XML data in jQuery UI autocomplete with PHP

Read more

How to add Select2 on Dynamic element – jQuery

Select2 jQuery plugin is easy to add on the <select > element. Need to call the select2() method on the selector to initialize.

If you adding select2 on a class or select element and when you add an element dynamically then select2 is not initialized on that element.

In this tutorial, I show how you can initialize select2 on dynamically created HTML <select > element using jQuery.

I am loading select2 data using jQuery AJAX in the example.

How to add select2 on Dynamic element - jQuery

Read more

Date range search in DataTable with jQuery AJAX and PHP

DataTable comes with a single search box that you can use to search on all or specific fields and display filtered records.

You can add custom elements according to your requirements and use them with DataTable.

In this tutorial, I show how you can implement a date range search in DataTable with jQuery AJAX and PHP. I am using jQuery UI for adding date picker.
Date range search in DataTable with jQuery AJAX and PHP

Read more

How to upload file with JavaScript and PHP

File uploading is a basic requirement in a website. It is done using a server-side script. Requires reloading the page after form submission to execute the script.

With AJAX client-side script is interact with the server-side script and performs the action without page reload.

In this tutorial, I show how you can upload file using JavaScript AJAX and PHP.

How to upload file with JavaScript and PHP

Read more