I want to call my ajax function untill already run ajax not give a response
Page is load on every sec and every sec ajax function call but i want to call ajax untill already run ajax function is not responde .
can i store ajax function refresh rate so that after this my function load ?
any solution ? please help me.
below are my code which i am using.
function realtime_content() {
var xmlhttp=false;
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
RTupdate_query = "RTajax=1&DB=" + DB + "" + groupQS + usergroupQS + "&adastats=" + adastats + "&SIPmonitorLINK=" + SIPmonitorLINK + "&IAXmonitorLINK=" + IAXmonitorLINK + "&usergroup=" + usergroup + "";
xmlhttp.open('POST', 'demophp');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(RTupdate_query);
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
document.getElementById("realtime_content").innerHTML = xmlhttp.responseText;
}
}
delete xmlhttp;
}
}
This is page load function
function refresh_display()
{
if ($start_count < 1)
{
realtime_content();
}
$start_count++;
if (ar_seconds > 0)
{
document.getElementById("refresh_countdown").innerHTML = "" + ar_seconds + "";
ar_seconds = (ar_seconds - 1);
setTimeout("refresh_display()",1000);
}
else
{
document.getElementById("refresh_countdown").innerHTML = "0"
realtime_content();
setTimeout("refresh_display()",1000);
}
}
I added an Image In this image page AST_timeonVDADall_final.php calling many times at page load and going in pending time.
So i want to resolve this pending time, if page is in pending no request go to on this page AST_timeonVDADall_final.php.
when pending resolved then this page AST_timeonVDADall_final.php call again.
I have a problem on how to rearrange my panels on mobile. The panels have different sizes. Pls see attach for the screenshot of the page in large screen (col-lg): EDIT: The large screen layout is ok, ...
I have a problem on how to rearrange my panels on mobile. The panels have different sizes. Pls see attach for the screenshot of the page in large screen (col-lg): EDIT: The large screen layout is ok, ...
I'm writing a NodeJS service that requests data from APIs. Under load, I don't want to hammer the API with potentially hundreds of simultaneous requests, so I am trying to queue up the requests so ...
I'm writing a NodeJS service that requests data from APIs. Under load, I don't want to hammer the API with potentially hundreds of simultaneous requests, so I am trying to queue up the requests so ...
I'm learning electron and I've made an electron app that read and create files. When I start the application with "npm start" or "electron ." it works as intended but when I use the "npm run build" ...
I'm learning electron and I've made an electron app that read and create files. When I start the application with "npm start" or "electron ." it works as intended but when I use the "npm run build" ...
I am new to React. I am trying to display few locations over Google Maps using google-map-react. I am using the below source for it. import React, { Component } from 'react'; import GoogleMapReact ...
I am new to React. I am trying to display few locations over Google Maps using google-map-react. I am using the below source for it. import React, { Component } from 'react'; import GoogleMapReact ...