I think this will help you.
http://snook.ca/archives/javascript/cross_domain_aj/
On Thu, Jul 30, 2009 at 07:00, Danny Ayers danny.ay...@gmail.com wrote:
I've run up against a cross-domain Ajax problem, essentially I want to
do something like:
(in http://hostA.com/page.html)
script
As mentioned in the comments of the thread Leonardo sent, you might
try flXHR, which is a client-side cross-domain Ajax proxy (invisible
flash). flXHR has an indentical API to normal native XHR calls. And
there's a very easy to use jQuery plugin that makes it ridiculously
simple to integrate.
However, re-examining your issue, it looks like all you would need to
do is set your data type to JSON, which CAN be done cross-domain. And
since you aren't needing a response, just make sure your server can
accept the data as GET instead of as POST (like in your code above),
and you should be
Google Analytics does it by passing their parameters on the src URI of
an image call which doesn't hit cross domain problems:
You may try http://plugins.jquery.com/project/flXHR
Laurian
On Jul 30, 11:00 am, Danny Ayers danny.ay...@gmail.com wrote:
I've run up against a cross-domain Ajax problem, essentially I want to
do something like:
(inhttp://hostA.com/page.html)
script
$.ajax({
Many thanks folks.
I wound up opting for a hidden form (thanks for the twit Laurian!) -
it allowed me to do a sweet RESTful POST and because I didn't need
anything back from the server there was no need to get my hands dirty
with iFrames. Maybe jQuery could benefit from such a feature?
Anyhow I
6 matches
Mail list logo