Search the web
Sign In
New User? Sign Up
AJAX_2-0 · AJAX 2.0 = XHTML DOM + Remote JavaScript
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How to make AJAX request between different domains??   Message List  
Reply | Forward Message #132 of 136 |
Re: [AJAX_2-0] How to make AJAX request between different domains??

My understanding is that most browsers won't allow cross-domain ajax requests as a security precaution - some may allow you to disable that, I dunno.
 
One thing I've done in the past is develop a server-side proxy that would exist (i.e.) on abc.com and act as a go-between between abc's AJAX scripts and xyz's xml response.
 -Jeff
 
http://www.sanctumvoid.net


----- Original Message ----
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.

Mon Aug 13, 2007 9:05 pm

sanctumvoid
Offline Offline
Send Email Send Email

Forward
Message #132 of 136 |
Expand Messages Author Sort by Date

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 ...
krishnakumar_08
Offline Send Email
Aug 13, 2007
5:58 pm

My understanding is that most browsers won't allow cross-domain ajax requests as a security precaution - some may allow you to disable that, I dunno. One thing...
Jeff Woodman
sanctumvoid
Offline Send Email
Aug 13, 2007
9:12 pm

Hi All, I found the solution myself.Here is a summary of what I have done:- I have a tomcat and Jboss installed on two different machines.I am making a call...
krishnakumar_08
Offline Send Email
Aug 14, 2007
7:19 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help