AJAX Question

S

shlomi.schwartz

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 ;-)
 
D

Dag Sunde

Tony said:
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?
 
J

Jim Ley

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.
 
D

Dag Sunde

Jim Ley said:
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.
 
T

Thomas 'PointedEars' Lahn

Dag said:
"Tony" [...] wrote [...]
Good said:
(e-mail address removed) 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
 
V

VK

Thomas said:
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.
 
T

Tony

Dag said:
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...
 
D

Dag Sunde

Tony said:
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...

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top