disable loading Bar on setInterval fetch script function

Hello ,
I am Using setInterval to fetch Api function every 10 second ,Like this :

//get driver location every 10 seconds
 window.setInterval(function() {
              $.get("<?= BasePath()?>/api/locations/<?= $appointments->id->CurrentValue?>", function(res) {
                      // get location
                      var pos = {
                              lat: +res[0],
                              lng: +res[1]
                        };
                  });  
    }, 10000); // 10000 milliseconds (10 second

Now what i need to do is disable upper loading bar on fetching , The loading bar it’s appear on fetching and it’s not looking so good ,
So what i can do to disable it please any idea ?

Hello ,
in PHPMaker Ver 2021 I get API result as an array to get longitude and latitude like this :

 $.get("<?= BasePath()?>/api/locations/<?= $appointments->id->CurrentValue?>", function(res) {
  // get location
          var pos = {
                   lat: +res[0],
                   lng: +res[1]
        };
});

and it’s work fine ,
In Ver 2022 I got this console log :

{lat: NaN, lng: NaN}
lat: NaN
lng: NaN

How Can i get the result from API as an array in Ver 2022 ?
Thanx…

  • You may try server side global code, e.g. (for v2022)
$options =& Config("PACE_OPTIONS.ajax.ignoreURLs");
$options[] = "/api/locations/";

Press F12 in your browser and check the HTML, search for “ignoreURLs” and make sure your added path is outputted.


  • Your API (/api/locations/{id}) returns NaN, you better check and update your server side code that returns the array. Also see Migrating to v2022 about DBAL.
  • That code helping , Thanx
$options =& Config("PACE_OPTIONS.ajax.ignoreURLs");
$options[] = "/api/locations/";
  • In Ver 2022 using API result array as number not longer available i think so i have replace result with field name like this :
$.get("<?= BasePath()?>/api/locations/<?= $appointments->id->CurrentValue?>", function(res) {
   // get location
    var pos = {
         lat: +res["current_latitude"],
         lng: +res["current_longitude"]
    };
});

and it’s work now , Thanx