but this promptly produces an [Exception... "Access to restricted URI
denied" code: "1012"...
The thing is, unlike most of the related scenarios I've found, I don't
actually want anything back from the server, I just want to send off
some page access data.
Because ultimately I want this thing to be easy for end-users, the use
of a server-side proxy is something I'd like to avoid. I'm pretty sure
this should be doable /somehow/ - it appears that Google Analytics
must get around the problem, but I haven't been able to suss out how.
> but this promptly produces an [Exception... "Access to restricted URI > denied" code: "1012"...
> The thing is, unlike most of the related scenarios I've found, I don't > actually want anything back from the server, I just want to send off > some page access data.
> Because ultimately I want this thing to be easy for end-users, the use > of a server-side proxy is something I'd like to avoid. I'm pretty sure > this should be doable /somehow/ - it appears that Google Analytics > must get around the problem, but I haven't been able to suss out how.
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. http://flxhr.flensed.com/jquery.php
On Jul 30, 8:03 am, Leonardo K <leo...@gmail.com> wrote:
> > but this promptly produces an [Exception... "Access to restricted URI
> > denied" code: "1012"...
> > The thing is, unlike most of the related scenarios I've found, I don't
> > actually want anything back from the server, I just want to send off
> > some page access data.
> > Because ultimately I want this thing to be easy for end-users, the use
> > of a server-side proxy is something I'd like to avoid. I'm pretty sure
> > this should be doable /somehow/ - it appears that Google Analytics
> > must get around the problem, but I haven't been able to suss out how.
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 fine.
But, if you must POST cross-domain, then flXHR and jquery.flXHRproxy
are good options for you.
On Jul 30, 8:24 am, getify <get...@gmail.com> wrote:
> 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. http://flxhr.flensed.com/jquery.php
> On Jul 30, 8:03 am, Leonardo K <leo...@gmail.com> wrote:
> > > but this promptly produces an [Exception... "Access to restricted URI
> > > denied" code: "1012"...
> > > The thing is, unlike most of the related scenarios I've found, I don't
> > > actually want anything back from the server, I just want to send off
> > > some page access data.
> > > Because ultimately I want this thing to be easy for end-users, the use
> > > of a server-side proxy is something I'd like to avoid. I'm pretty sure
> > > this should be doable /somehow/ - it appears that Google Analytics
> > > must get around the problem, but I haven't been able to suss out how.
> but this promptly produces an [Exception... "Access to restricted URI
> denied" code: "1012"...
> The thing is, unlike most of the related scenarios I've found, I don't
> actually want anything back from the server, I just want to send off
> some page access data.
> Because ultimately I want this thing to be easy for end-users, the use
> of a server-side proxy is something I'd like to avoid. I'm pretty sure
> this should be doable /somehow/ - it appears that Google Analytics
> must get around the problem, but I haven't been able to suss out how.
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 did a little write-up of the options I found for cross-domain
Ajax at: