By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 1,207 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

AJAX Question

P: n/a
Hi All,

Q: Is it possible to send an XMLHttpRequest between 2 different
domains?

right now I'm using an Iframe to do so

thanks ;-)

Feb 13 '06 #1
Share this Question
Share on Google+
12 Replies


P: n/a
sh*************@gmail.com wrote in news:1139823895.923599.313360
@g44g2000cwa.googlegroups.com:
Hi All,

Q: Is it possible to send an XMLHttpRequest between 2 different
domains?


nope.
Feb 13 '06 #2

P: n/a
Good Man wrote:
sh*************@gmail.com wrote in news:1139823895.923599.313360
@g44g2000cwa.googlegroups.com:
Hi All,

Q: Is it possible to send an XMLHttpRequest between 2 different
domains?


nope.


umm - i've done it...

Feb 13 '06 #3

P: n/a
"Tony" <to****@dslextreme.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Good Man wrote:
sh*************@gmail.com wrote in news:1139823895.923599.313360
@g44g2000cwa.googlegroups.com:
> Hi All,
>
> Q: Is it possible to send an XMLHttpRequest between 2 different
> domains?


nope.


umm - i've done it...


Then I suggest you tell us how...?

With a serverside proxy, yes of course... Then it is simple, but
a cross-domain XMLHttpRequest directly from the client?

--
Dag.
Feb 14 '06 #4

P: n/a
On 14 Feb 2006 08:20:26 +0100, "Dag Sunde" <da*@viz.no> wrote:
"Tony" <to****@dslextreme.com> wrote in message
news:11*********************@z14g2000cwz.googlegr oups.com...
Good Man wrote:
sh*************@gmail.com wrote in news:1139823895.923599.313360
@g44g2000cwa.googlegroups.com:

> Hi All,
>
> Q: Is it possible to send an XMLHttpRequest between 2 different
> domains?

nope.


umm - i've done it...


Then I suggest you tell us how...?

With a serverside proxy, yes of course... Then it is simple, but
a cross-domain XMLHttpRequest directly from the client?


it's still simple, you just configure IE to "access data sources
across domains" or in Mozilla you get appopriate browser privileges
for your script.

Smple doesn't mean practical though.

Jim.
Feb 14 '06 #5

P: n/a
"Jim Ley" <ji*@jibbering.com> wrote in message
news:43****************@news.individual.net...
On 14 Feb 2006 08:20:26 +0100, "Dag Sunde" <da*@viz.no> wrote:
"Tony" <to****@dslextreme.com> wrote in message
news:11*********************@z14g2000cwz.googleg roups.com...
Good Man wrote:
sh*************@gmail.com wrote in news:1139823895.923599.313360
@g44g2000cwa.googlegroups.com:

> Hi All,
>
> Q: Is it possible to send an XMLHttpRequest between 2 different
> domains?

nope.

umm - i've done it...


Then I suggest you tell us how...?

With a serverside proxy, yes of course... Then it is simple, but
a cross-domain XMLHttpRequest directly from the client?


it's still simple, you just configure IE to "access data sources
across domains" or in Mozilla you get appopriate browser privileges
for your script.

Smple doesn't mean practical though.

Excactly... Which means it is't usable at all except when you're
working with an intranet where one have complete control over the UAs.

--
Dag.

Feb 14 '06 #6

P: n/a
Dag Sunde wrote:
"Tony" [...] wrote [...]
Good Man wrote:
sh*************@gmail.com wrote [...]:
> Q: Is it possible to send an XMLHttpRequest between 2 different
> domains?
nope.

umm - i've done it...


Then I suggest you tell us how...?

With a serverside proxy, yes of course... Then it is simple, but
a cross-domain XMLHttpRequest directly from the client?


Possibilities:

A) The OP used `document.domain' since the domains were different but
their second-level domain was not.

B) a) The OP used a signed script or set a preference so that no signed
script was necessary, then he requested the required privilege.

b) The OP did not sign the script and accepted that users would get
a security dialog when he requested the required privilege.

C) None of the above.
PointedEars
Feb 14 '06 #7

P: n/a
VK

Thomas 'PointedEars' Lahn wrote:
Possibilities:

A) The OP used `document.domain' since the domains were different but
their second-level domain was not.

B) a) The OP used a signed script or set a preference so that no signed
script was necessary, then he requested the required privilege.

b) The OP did not sign the script and accepted that users would get
a security dialog when he requested the required privilege.

C) None of the above.


D) (and the main one) OP goes to say
<http://cgi.resourceindex.com/Programs_and_Scripts/Perl/Content_Retrieval/>
to take any content stealing script of his choice (free or
"commercial") and enjoy ever after.

Feb 14 '06 #8

P: n/a
VK wrote:
Thomas 'PointedEars' Lahn wrote:
Possibilities:

A) The OP used `document.domain' since the domains were different but
their second-level domain was not.

B) a) The OP used a signed script or set a preference so that no signed
script was necessary, then he requested the required privilege.

b) The OP did not sign the script and accepted that users would get
a security dialog when he requested the required privilege.

C) None of the above.
D) (and the main one) OP goes to say

<http://cgi.resourceindex.com/Programs_and_Scripts/Perl/Content_Retrieval/> to take any content stealing script of his choice (free or
"commercial") and enjoy ever after.


news:43********@news.wineasy.se
PointedEars
Feb 14 '06 #9

P: n/a
Dag Sunde wrote:
"Tony" <to****@dslextreme.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Good Man wrote:
sh*************@gmail.com wrote in news:1139823895.923599.313360
@g44g2000cwa.googlegroups.com:

> Hi All,
>
> Q: Is it possible to send an XMLHttpRequest between 2 different
> domains?

nope.


umm - i've done it...


Then I suggest you tell us how...?

With a serverside proxy, yes of course... Then it is simple, but
a cross-domain XMLHttpRequest directly from the client?


I just checked out what I had done before - and noticed that I had only
tested it as a local file - never on a server.

As a local file, it's no problem to get the HTML response from, say,
Google or Yahoo (which are the targets that I tried). But when I put
the same file on a server, I get "permission denied".

So, I suppose that technically I've done it, but not in any useful
manner. My apologies for the fogged memory...

Feb 14 '06 #10

P: n/a
"Tony" <to****@dslextreme.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Dag Sunde wrote:
"Tony" <to****@dslextreme.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
> Good Man wrote:
>> sh*************@gmail.com wrote in news:1139823895.923599.313360
>> @g44g2000cwa.googlegroups.com:
>>
>> > Hi All,
>> >
>> > Q: Is it possible to send an XMLHttpRequest between 2 different
>> > domains?
>>
>> nope.
>
> umm - i've done it...
>


Then I suggest you tell us how...?

With a serverside proxy, yes of course... Then it is simple, but
a cross-domain XMLHttpRequest directly from the client?


I just checked out what I had done before - and noticed that I had only
tested it as a local file - never on a server.

As a local file, it's no problem to get the HTML response from, say,
Google or Yahoo (which are the targets that I tried). But when I put
the same file on a server, I get "permission denied".

So, I suppose that technically I've done it, but not in any useful
manner. My apologies for the fogged memory...


Thank you, Tony...

You had me worried there for a while...

:-)

--
Dag.
Feb 14 '06 #11

P: n/a
here is a nice workaround

http://ajaxextended.com/

not really AJAX but nice solution

Feb 20 '06 #12

P: n/a
<sh*************@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
here is a nice workaround

http://ajaxextended.com/


Hmpf...

That is just a proxy script on the server.

You can do exactly the same with an AJAX serverside
proxy script and call it via the usual XmlHttp...

--
Dag.
Feb 20 '06 #13

This discussion thread is closed

Replies have been disabled for this discussion.