Auto populate Dropdown with jQuery AJAX in Laravel 9

Dropdown menus are a common element in web applications, it provides a list of options to choose from.

While dropdowns can be manually populated with a set of predefined options, it’s often more efficient to retrieve the options dynamically from a server. In this case, user is restricted to select an option from the dropdown. The list gets updated based on the parent element selection.

In this tutorial, I show how you can autopopulate dropdown with MySQL database data using jQuery AJAX in Laravel 9.

Auto populate Dropdown with jQuery AJAX in Laravel

Read more

How to upload a file using jQuery AJAX in Laravel 10

File uploads are a common requirement for many web applications in web development. Uploading files using the old-fashioned way takes time and causes the page to refresh, disrupting the user experience. jQuery AJAX makes it easy to upload files without having to refresh the page.

Require to send CSRF token with AJAX request to upload the file in Laravel.

In this tutorial, I show how you can upload a file using jQuery AJAX with Validation and display preview in Laravel 10.

How to upload a file using jQuery AJAX in Laravel

Read more

DataTables AJAX Pagination with Search and Sort in CodeIgniter 4

Pagination is a widely used method to enhance user experience when displaying large amounts of data on a web page.

With the use of DataTables jQuery plugin you can easily implement pagination in your CodeIgniter 4 project. It adds different features along with pagination like – sorting, searching, and changing the number of rows view per page.

It allows adding pagination with and without AJAX.

In this tutorial, I show how you can implement DataTables AJAX pagination with search and sort in the CodeIgniter 4 project. I am using CSRF token in the example, if you don’t know how to enable it then you can view this tutorial.

DataTables AJAX Pagination with Search and Sort in CodeIgniter 4

Read more

How to Implement jQuery UI Autocomplete in CodeIgniter 4

jQuery UI Autocomplete is a great choice to take into consideration if you want to improve the search functionality of your CodeIgniter 4 application. Based on the user’s input in a textbox, you can use display a list of recommendations.

jQuery UI Autocomplete provides the flexibility to display suggestions with or without AJAX, depending on your specific needs.

In this tutorial, we will explore how to implement jQuery UI Autocomplete in a CodeIgniter 4 project and load data from a MySQL database using jQuery AJAX. By the end of this tutorial, you will have a better understanding of how to incorporate this useful search functionality into your own CodeIgniter 4 application.

I am using CSRF token with an AJAX request, if you don’t know how to enable it then you can view this tutorial.

How to Implement jQuery UI Autocomplete in CodeIgniter 4

Read more