Hello everyone,
I just finish creating a Ajax grid and for some reason I get an internal server error and was wondering what it really meant!!!
I’ll post you the code were the error occurs
function handleGridPageLoad()
{
// when readyState is 4, we read the server response
if (xmlHttp.readyState == 4)
{
// continue only if HTTP status is "OK"
if (xmlHttp.status == 200)
{
// read the response
response = xmlHttp.responseText;
// server error?
if (response.indexOf("ERRNO") >= 0
|| response.indexOf("error") >= 0
|| response.length == 0)
{
// display error message
alert(response.length == 0 ? "Server serror." : response);
// exit function
return;
}
// the server response in XML format
xmlResponse = xmlHttp.responseXML;
// browser with native functionality?
if (window.XMLHttpRequest && window.XSLTProcessor &&
window.DOMParser)
{
// load the XSLT document
var xsltProcessor = new XSLTProcessor();
xsltProcessor.importStylesheet(stylesheetDoc);
// generate the HTML code for the new page of products
page = xsltProcessor.transformToFragment(xmlResponse, document);
// display the page of products
var gridDiv = document.getElementById(gridDivId);
gridDiv.innerHTML = "";
gridDiv.appendChild(page);
}
// Internet Explorer code
else if (window.ActiveXObject)
{
// load the XSLT document
var theDocument = createMsxml2DOMDocumentObject();
theDocument.async = false;
theDocument.load(xmlResponse);
// display the page of products
var gridDiv = document.getElementById(gridDivId);
gridDiv.innerHTML = theDocument.transformNode(stylesheetDoc);
}
}
else
{
alert("Error reading server response");
}
}
}
Thank you for your help!