There is a pretty concise example here
Try making your URL http://recpushdata.cyndigo.com/Jobs.asmx/InsertXML
PS. Your code is unreadable in StackOverflow.
There is a pretty concise example here
Try making your URL http://recpushdata.cyndigo.com/Jobs.asmx/InsertXML
PS. Your code is unreadable in StackOverflow.
I use the folllowing code to create an XML object. Its been designed to handle all browsers (esp. IE and non IE)
/* Function to create an XMLHTTP object for all browsers */
function getXMLHTTPObject(){
var xmlHttp;
try{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}catch (e){
// Internet Explorer
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;
}
}
}
return xmlHttp;
}
/* End Function */
P.S. You code in the question is not readable. Pls format it
As far as I know, the XMLHTTP request must point to a page on the same subdomain of the html page for the various browsers permissions.
One trick is to make another page on the same server in your preferred language and make it handle the request with the server's network.
Example:
from your HTML page you make a ajax request to mydomain.com/externalrequest.php?url=www.google.com and that page will connect (fsock/cURL etc) to "url" and return it
If you are TRYING to go cross-domain with XHR, you can look into the JSONP method. Check JQuery docs for that.
Would require you to accept JSON response but it does work across domains.