Adam Carter

Adam Carter


jQuery Ajax Loading Spinner Example

If you are searching like jquery ajax loading spinner example, jquery ajax loading image example, jquery loading spinner overlay, jquery ajax loading image while getting the data, display loading image when ajax call is in progress. So this tutorial is very helpful for you.

In this jQuery Ajax Loading Spinner Example post, we would love to share with you how to add or create ajax loading spinner in your HTML pages or web pages with example.

And if you want to replace the spinner with an image. So you can create a gif image and create a jquery ajax loading image example.

Most of the time we bring data by calling Ajax on the web page. or So sometimes it takes time for the response from the server. Or submit a form on the web page. So as soon as you click on the submit button of the form. And the form is submitted by Ajax. So jquery ajax spinner has to be applied in all these conditions.

This jQuery Ajax spinner tells the user that the request is being processed right now. It has not been completed yet. And whenever the server request completes, the jQuery Ajax spinner is removed.

jQuery Ajax Loading Spinner Example

Follow the steps given below and you can create jQuery Ajax Loading Spinner:

1. Create an index.html

First of all, you need to create one index.html file and update the following code into your file:

<!DOCTYPE html>
	<title>jQuery Ajax Loading Spinner  Example</title>
	<script src=""></script>  

	<button id='getDataBtn'>Get Data</button>

	<div id="richList"></div>

	<div id="loader" class="lds-dual-ring hidden overlay"></div>


2. Create One CSS file

Next step, you need to create one CSS file and update the following code into your file:

body {
        background: #ececec;
    /*Hidden class for adding and removing*/
    .lds-dual-ring.hidden {
        display: none;

    /*Add an overlay to the entire page blocking any further presses to buttons or other elements.*/
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,.8);
        z-index: 999;
        opacity: 1;
        transition: all 0.5s;

    /*Spinner Styles*/
    .lds-dual-ring {
        display: inline-block;
        width: 80px;
        height: 80px;
    .lds-dual-ring:after {
        content: " ";
        display: block;
        width: 64px;
        height: 64px;
        margin: 5% auto;
        border-radius: 50%;
        border: 6px solid #fff;
        border-color: #fff transparent #fff transparent;
        animation: lds-dual-ring 1.2s linear infinite;
    @keyframes lds-dual-ring {
        0% {
            transform: rotate(0deg);
        100% {
            transform: rotate(360deg);

3. Create one js file

After that, create a new js file and udpate the following code into your js file:

// Define our button click listener
    $('#getDataBtn').click(function () {

        // On click, execute the ajax call.
            type: "GET",
            url: "",
            dataType: 'json',
            beforeSend: function () { // Before we send the request, remove the .hidden class from the spinner and default to inline-block.
            success: function (data) {
                // On Success, build our rich list up and append it to the #richList div.
                if (data.length > 0) {
                    let richList = "<ol>";
                    for (let i = 0; i < data.length; i++) {
                        richList += "<li>" + data[i].uri + "</li>";
                    richList += "</ol>"
            complete: function () { // Set our complete callback, adding the .hidden class and hiding the spinner.

Next and final step, The css and js file you created earlier. Include both those files in the html page.

You can see it How we have included the css and js file in the html page.

<!DOCTYPE html>
	<title>jQuery Ajax Loading Spinner  Example</title>
	<script src=""></script>  
	<link rel="alternate" href="spinner.css">

	<button id='getDataBtn'>Get Data</button>

	<div id="richList"></div>

	<div id="loader" class="lds-dual-ring hidden overlay"></div>

	<script src="spinner.js"></script>  


Here you have learned how to create/add jQuery Ajax Loading Spinner on Html / Web Pages with example.

#javascript #jquery

What is GEEK

Buddha Community

jQuery Ajax Loading Spinner Example

I am Developer


PHP jQuery Ajax Post Form Data Example

PHP jquery ajax POST request with MySQL. In this tutorial, you will learn how to create and submit a simple form in PHP using jQuery ajax post request. And how to submit a form data into MySQL database without the whole page refresh or reload. And also you will learn how to show an error message to the user if the user does not fill any form field.

And this tutorial also guide on how to send data to MySQL database using AJAX + jQuery + PHP without reloading the whole page and show a client-side validation error message if it has an error in the form.

PHP jQuery AJAX POST Form Data In Into MySQL DB Example

Just follow the few below steps and easily create and submit ajax form in PHP and MySQL with client-side validation.

  • Create Database And Table
  • Create a Database Connection File
  • Create An Ajax POST Form in PHP
  • Create An Ajax Data Store File

#jquery ajax serialize form data example #submit form using ajax in php example #save form data using ajax in php #how to insert form data using ajax in php #php jquery ajax form submit example #jquery ajax and jquery post form submit example with php

Einar  Hintz

Einar Hintz


jQuery Ajax CRUD in ASP.NET Core MVC with Modal Popup

In this article, we’ll discuss how to use jQuery Ajax for ASP.NET Core MVC CRUD Operations using Bootstrap Modal. With jQuery Ajax, we can make HTTP request to controller action methods without reloading the entire page, like a single page application.

To demonstrate CRUD operations – insert, update, delete and retrieve, the project will be dealing with details of a normal bank transaction. GitHub repository for this demo project :

Sub-topics discussed :

  • Form design for insert and update operation.
  • Display forms in modal popup dialog.
  • Form post using jQuery Ajax.
  • Implement MVC CRUD operations with jQuery Ajax.
  • Loading spinner in .NET Core MVC.
  • Prevent direct access to MVC action method.

Create ASP.NET Core MVC Project

In Visual Studio 2019, Go to File > New > Project (Ctrl + Shift + N).

From new project window, Select Asp.Net Core Web Application_._

Image showing how to create ASP.NET Core Web API project in Visual Studio.

Once you provide the project name and location. Select Web Application(Model-View-Controller) and uncheck HTTPS Configuration. Above steps will create a brand new ASP.NET Core MVC project.

Showing project template selection for .NET Core MVC.

Setup a Database

Let’s create a database for this application using Entity Framework Core. For that we’ve to install corresponding NuGet Packages. Right click on project from solution explorer, select Manage NuGet Packages_,_ From browse tab, install following 3 packages.

Showing list of NuGet Packages for Entity Framework Core

Now let’s define DB model class file – /Models/TransactionModel.cs.

public class TransactionModel
    public int TransactionId { get; set; }

    [Column(TypeName ="nvarchar(12)")]
    [DisplayName("Account Number")]
    [Required(ErrorMessage ="This Field is required.")]
    [MaxLength(12,ErrorMessage ="Maximum 12 characters only")]
    public string AccountNumber { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Beneficiary Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BeneficiaryName { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Bank Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BankName { get; set; }

    [Column(TypeName ="nvarchar(11)")]
    [DisplayName("SWIFT Code")]
    [Required(ErrorMessage = "This Field is required.")]
    public string SWIFTCode { get; set; }

    [Required(ErrorMessage = "This Field is required.")]
    public int Amount { get; set; }

    [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")]
    public DateTime Date { get; set; }


Here we’ve defined model properties for the transaction with proper validation. Now let’s define  DbContextclass for EF Core. core article core #add loading spinner in core core crud without reloading core jquery ajax form core modal dialog core mvc crud using jquery ajax core mvc with jquery and ajax core popup window #bootstrap modal popup in core mvc. bootstrap modal popup in core #delete and viewall in core #jquery ajax - insert #jquery ajax form post #modal popup dialog in core #no direct access action method #update #validation in modal popup

I am Developer


jQuery ajax get request method example

jQuery Ajax Get Request Method Example

This article is originally published at

Let’s see example of jquery ajax get request.

<html lang="en">
<meta charset="utf-8">
<title>jQuery Ajax GET Request Example</title>
<script src=""></script> 
    padding: 15px;
    border: 12px solid #23384E;
    background: #28BAA2;
    margin-top: 10px;
<script type="text/javascript">
    var name = "Tutsmake";
    $.get('', {webname: name}, function(data){
    <div class="formClass">
      <button type="button">Click &amp; Get Data</button><br>
      <div id="output">Hello</div>    
</html>   ```                         

This article is originally published at []( "")

#jquery #jquery ajax get request with parameters #ajax get method example #jquery ajax get request parameters #ajax

Laravel AJAX CRUD Example Tutorial

Hello Guys,

Today I will show you how to create laravel AJAX CRUD example tutorial. In this tutorial we are implements ajax crud operation in laravel. Also perform insert, update, delete operation using ajax in laravel 6 and also you can use this ajax crud operation in laravel 6, laravel 7. In ajax crud operation we display records in datatable.

Read More : Laravel AJAX CRUD Example Tutorial

Read Also : Read Also : Laravel 6 CRUD Tutorial with Example

#laravel ajax crud example tutorial #ajax crud example in laravel #laravel crud example #laravel crud example with ajax #laravel #php

I am Developer


Laravel 7 Ajax Dynamic Dependent Dropdown

In this tutorial i will share with you how to create dependent dropdown using ajax in laravel. Or how to create selected subcategories dropdown based on selected category dropdown using jQuery ajax in laravel apps.

As well as learn, how to retrieve data from database on onchange select category dropdown using jQuery ajax in drop down list in laravel.

Laravel Ajax Dynamic Dependent Dropdown Tutorial

Follow the below steps and implement dependent dropdown using jQuery ajax in laravel app:

  1. Step 1: Install Laravel New App
  2. Step 2: Add Database Details
  3. Step 3: Create Model and Migration
  4. Step 4: Add Routes
  5. Step 5: Create Controllers By Artisan
  6. Step 6: Create Blade Views
  7. Step 7: Run Development Server

Originally published at

#laravel jquery ajax categories and subcategories select dropdown #jquery ajax dynamic dependent dropdown in laravel 7 #laravel dynamic dependent dropdown using ajax #display category and subcategory in laravel #onchange ajax jquery in laravel #how to make dynamic dropdown in laravel