Skip to content

From Small to BIGGER

Menu
  • Home
  • About Us
  • Portofolio
  • Contact
Menu

Jquery – Ajax Async Parallel

Posted on September 25, 2022October 21, 2022 by kura

you can set ajax async: false , example this

    // get data 1
    $.ajax({
        type: "GET",
        url: _apiOPD,
        dataType: "json",
        async: false,
        success: function (response) {
            console.log(response);
        }
    });

    // get data 2
    $.ajax({
        type: "GET",
        url: _apiUnitOrganisasi,
        data: {
            opd_id: $('#opd_id').val(),
        },
        dataType: "json",
        async: false,
        success: function (response) {
            console.log(response);
        }
    });

    // get data 3
    $.ajax({
        type: "GET",
        url: _apiUnitKerja,
        data: {
            opd_id: $('#opd_id').val(),
            unit_organisasi_id: $('#unit_organisasi_id').val(),
        },
        dataType: "json",
        async: false,
        success: function (response) {
            console.log(response);
        }
    });
FacebookTweetLinkedIn

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Laravel & Datatables – Server Side Manualy
  • Linux – User Login Set Directory & Set Permission
  • Javascript Call Function From iFrame
  • Python – Create data dummy attendance
  • PHPWord Convert HTML + PDF

Categories

  • Apache
  • Database
  • Freeradius
  • Javascript
  • Mikrotik
  • Mysql
  • Networking
  • PHP
  • Postgresql
  • Programming
  • Python
  • Server
©2025 From Small to BIGGER | Built using WordPress and Responsive Blogily theme by Superb