From: krishnakumar_08 <krishnakumar_08@...>
To: AJAX_2-0@yahoogroups.com
Sent: Monday, August 13, 2007 11:21:43 AM
Subject: [AJAX_2-0] How to make AJAX request between different domains??
Hi,
I am working on an application where I am reuired to make AJAX calls
between different domains.Below is the summary of my problem:
Say there is a domain
abc.com
there is another domain called
xyz.com
I want to make AJAX calls from abc.com to
xyz.com
============ ========= ========= ========= ========= =======
Sample code would be:
(this will be contained in any page of abc.com)
var url = "xyz.com?strCriteri a=testcriteria" ;
if (window.XMLHttpRequ est) {
req = new XMLHttpRequest( );
} else if (window.ActiveXObje ct) {
req = new ActiveXObject( "Microsoft. XMLHTTP") ;
}
req.open("GET" , url, true);
req.onreadystatecha nge = callback;
req.send(null) ;
============ ========= ========= ========= ========= ======
When I do this it gives me "Access is denied".
How do I do that?
Please suggest any AJAX or non AJAX
solution.
Need a vacation? Get great deals to amazing places on Yahoo! Travel.