This is my ajax code,
For example URL 1 : www.text1.com and URL 2 : www.text2.com/check.asp
Here i wand to post data from text1.com to text2.com....
Is it possible?
<script type="text/javascript">
function ajaxFunctionSearch() {
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) {
document.getElementById("SXML").value = xmlHttp.responseText;
}
}
var params = "CountryID=" + document.getElementById("DEMOCNY").value
xmlHttp.open("POST", "http://text2.com/Check.asp", true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(params);
}
</script>