Here is my code
<code>function getInvoicesToFulfillCount(){
$.ajax({
type: 'POST',
url: FULL_PATH + "/invoice-report/get-invoices-to-fulfill-count",
dataType: "json",
async : true,
beforeSend: function () {
//loading_btn.start();
},
complete: function () {
//loading_btn.stop();
},
success: function (response) {
if (response.success) {
//console.log("PP:-"+response.count);
$('#invoices-to-fulfill-count').text("Invoices to Fulfill ("+response.count+")");
} else if (response.error) {
console.log("Error while fetching invoices to fulfill count");
} else {
console.log("Error while fetching invoices to fulfill count");
}
},
});
}
</code>
<code>function getInvoicesToFulfillCount(){
$.ajax({
type: 'POST',
url: FULL_PATH + "/invoice-report/get-invoices-to-fulfill-count",
dataType: "json",
async : true,
beforeSend: function () {
//loading_btn.start();
},
complete: function () {
//loading_btn.stop();
},
success: function (response) {
if (response.success) {
//console.log("PP:-"+response.count);
$('#invoices-to-fulfill-count').text("Invoices to Fulfill ("+response.count+")");
} else if (response.error) {
console.log("Error while fetching invoices to fulfill count");
} else {
console.log("Error while fetching invoices to fulfill count");
}
},
});
}
</code>
function getInvoicesToFulfillCount(){
$.ajax({
type: 'POST',
url: FULL_PATH + "/invoice-report/get-invoices-to-fulfill-count",
dataType: "json",
async : true,
beforeSend: function () {
//loading_btn.start();
},
complete: function () {
//loading_btn.stop();
},
success: function (response) {
if (response.success) {
//console.log("PP:-"+response.count);
$('#invoices-to-fulfill-count').text("Invoices to Fulfill ("+response.count+")");
} else if (response.error) {
console.log("Error while fetching invoices to fulfill count");
} else {
console.log("Error while fetching invoices to fulfill count");
}
},
});
}
I tried with window.load(), async:true
but nothing is working. I want to navigate to other links from the current web page even if the data load takes time.
New contributor
Sarmistha Sahoo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1