I have this code:
function newXMLHttpRequest() {
var xmlHttp;
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (f) {
xmlHttp = new XMLHttpRequest();
}
}
return xmlHttp;
}
var xmlHttp = newXMLHttpRequest();
xmlHttp.open("POST", url, true);
xmlHttp.onreadystatechange = function() {
// this I have xmlHttp.status = 12019
alert("readyState = " + xmlHttp.readyState + "\nstatus = " + xmlHttp.status);
}
xmlHttp.send('same data');
When I send request to the server with invalid certificate I have error with status code 12019.
Solution should be cross-browser (IE, FF, Chrome)