views:

88

answers:

4

I need to use AJAX to get the content of another page located on a different server from the one the AJAX is loaded from. The AJAX needs to send a POST request then return the result. how can i do this?

+3  A: 

Set up proxy on your own server. Have your server call theirs and return the result.

Diodeus
I can't. My server will only let me use GET to request external web pages.
Jcubed
+2  A: 

There is no way to go around that policy. This policy is there for very good reasons. That is also no problem as long as you're in control over the web application. You could simply redirect the call to the other server from your webserver and pass the result. This would work out like a proxy.

Sebastian P.R. Gingter
+2  A: 

if you control both servers, you can use one of the HTTP header fields for cross-origin resource sharing:

http://www.petefreitag.com/item/703.cfm

https://developer.mozilla.org/En/HTTP%5Faccess%5Fcontrol

Jason S
Do browsers honor Access-Control-Allow-Origin header yet?
Murali VP
A: 
Mic