I know from reading on here that it is not possible to开发者_开发知识库 do a cross domain POST action using jsonp and javascript. But I have to write back data to a web service that's on a different domain using javascript - how do others do it? Just hack it and use a GET action?
Write a proxy, it is super simple.
I've ended up just using a GET method and sending my details back. Not the way REST is supposed to be used but on investigation this is what a number of other web sites seem to do.
how different are the urls? Depending on the answer you might be able to do it with javascript. Assuming that the same origin policy does indeed apply, one way would be to post to the server that served the page, and then on the server use an http library to post to the other system.
There is this article on ajaxian, just about this annoyance:
http://ajaxian.com/archives/how-to-make-xmlhttprequest-calls-to-another-server-in-your-domain
精彩评论