We can have multiple dhtmlx components on a given html page. For our current situation we have a DHTMLX grid on our page.
This page can be accessed in two ways:
- Using a web server like IIS.
- Opening the html page locally(By double clicking on the html file)
Web server access works fine, however when html is accessed locally we get an unhandled exception from dhtmlx.js.
It’s coming from the following code:
if ((v.readyState == 4) || (o == true && v.readyState == 3)) {
if (v.status != 200 || v.responseText == ""){
h.reject(v); // This throws unhandled exception
if (!dhx4.callEvent("onAjaxError", [{
xmlDoc: v,
filePath: e,
async: n
}])) {
return
}
}
When I debugged this code, I figured out that v.Status was always “0”, since we are accessing the file locally. To fix this exception I removed “v.status != 200”.
Was wondering if you could help us fix it in a proper way.
Thanks in Advance.