Retain AJAX pagination position after Refresh in CodeIgniter

AJAX pagination makes it easier to display the large list of records in multiple pages without refreshing the whole page when navigating.

While navigating pages if you refreshed the webpage then it will load record from 1st instead of page position before the refresh.

E.g. If you are on the 5th page then it will again start from 1st when webpage reload.

To retain the position, I am using COOKIE to store the page number and use it after page successfully load to fetch records in CodeIgniter.

Retain AJAX pagination position after Refresh in CodeIgniter

Read more

How to send AJAX request from WordPress theme

AJAX makes easier to perform operations without submitting the form like – fetch, insert, delete records from MySQL database, file uploading, etc.

Using AJAX in WordPress is a little different. Here, need to consider two things –

  • AJAX sent URL should be admin-ajax.php.
  • wp_ajax action hooks.

In this tutorial, I show how you can handle AJAX request in your WordPress theme.

How to send AJAX request from WordPress theme

Read more

Check Username Availability with Vue.js and PHP

Live username availability checking on the registration page is the common feature on most websites.

This will notify the user whether the username is already been taken or not before submitting it.

To do this require AJAX.

Send a request to check the username on the basis of response to perform the action.

In this tutorial, I show how you can check username availability using Vue.js and PHP while inputting.

Check Username Availability with Vue.js and PHP

Read more