hi,
i using below asp code for xml request
<%
pXML=Server.URLencode(SearchRequest)
set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhtt.open "post", http://OutSideDomain/xml_requests , false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send "xml_request=" &pXML
htresult = xmlhttp.responsexml.xml
%>
I try to write the above code in javascript(Ajax)
<script type="text/javascript">
function loadXMLDoc()
{
var xmlHttp;
try
{
xmlHttp=new XMLHttpRequest(); }
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState==4)
{
alert(xmlHttp.responseText);
}
}
var params ='xml_request=' +'<%=pXML>';
xmlHttp.open("POST","http://OutSideDomain/xml_requests",true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(params);
}
</script>
The above asp code is working fine and get xml response,
But in the javascript i getting error is "Access Denied" in the like xmlHttp.send(params);
what is the problem for "Access Denied"?,
I here that from one HTTP to another HTTP is not possible ... But that thing is working in my asp page..
How i solve this ?
hoping your response