hii
i am trying to get response from domain https://www.dex-intl.com/data_access_layer/search_box_dal.php through ajax call, but getting following exception
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/projects/mtdb/Ajaxcall.php :: loadajex :: line 39" data: no]
/////my code is
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Testing Ajex</title>
<script type="text/javascript">
function getHTTPObject()
{
var xhr = false;
if (window.XMLHttpRequest)
{
xhr = new XMLHttpRequest();
}
else if (window.ActiveXObject) {
try
{
xhr = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
xhr = false;
}
}
}
return xhr;
}
var request;
function loadajex(){
var request = getHTTPObject();
request.open("GET",'https://www.dex-intl.com/data_access_layer/search_box_dal.php?msgno=333333',false);
request.send(null);
if(request.status==200){
alert(request.responseText);
}
}
</script>
</head>
<body>
<div>Call to <a href="" onclick="loadajex()">Dex-intel.com</a></div>
<div id="response"></div>
</body>
</html>