Speed question - XmlHttpObject
Hi all
I am not sure if this is the corrcet place to ask but I always get helpful responses so i thought its worth a try!
I have a panel within my website which pulls out and displays customer records. The customer table contains over 10,000 records.
I trigger the panel via a button, however the displaying of the panel and the customer records can sometimes take up to 15 seconds via a browser.
When I run the query direct on the database I get the results back within 2-3 seconds.
I am using the following JS to display the panel - could this be causing the delay:
- function displayPrimaryContacts() {
var url = "/ajaxscripts/displayPrimaryContacts.php";
var info = "";
xmlHttp = GetXmlHttpObject(displayPrimaryContactsDone);
xmlHttp.open("POST", url , true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", info.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(info);
}
function displayPrimaryContactsDone() {
var output = '';
if(xmlHttp.readyState == 4) {
if(xmlHttp.status == 200) {
output = xmlHttp.responseText;
showAjaxPopup("Primary Contact Details", output, 600, 300, 1);
}
}
}