AJAX Question

Discussion in 'Javascript' started by shlomi.schwartz@gmail.com, Feb 13, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. Tony Guest

    Good Man wrote:
    > 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...
     
    Tony, Feb 13, 2006
    #2
    1. Advertising

  3. Dag Sunde Guest

    "Tony" <> wrote in message
    news:...
    > Good Man wrote:
    >> 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.
     
    Dag Sunde, Feb 14, 2006
    #3
  4. Jim Ley Guest

    On 14 Feb 2006 08:20:26 +0100, "Dag Sunde" <> wrote:

    >"Tony" <> wrote in message
    >news:...
    >> Good Man wrote:
    >>> 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.
     
    Jim Ley, Feb 14, 2006
    #4
  5. Dag Sunde Guest

    "Jim Ley" <> wrote in message
    news:...
    > On 14 Feb 2006 08:20:26 +0100, "Dag Sunde" <> wrote:
    >
    >>"Tony" <> wrote in message
    >>news:...
    >>> Good Man wrote:
    >>>> 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.
     
    Dag Sunde, Feb 14, 2006
    #5
  6. Dag Sunde wrote:

    > "Tony" [...] wrote [...]
    >> Good Man wrote:
    >>> 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
     
    Thomas 'PointedEars' Lahn, Feb 14, 2006
    #6
  7. VK Guest

    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.
     
    VK, Feb 14, 2006
    #7
  8. 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:43f184ba$


    PointedEars
     
    Thomas 'PointedEars' Lahn, Feb 14, 2006
    #8
  9. Tony Guest

    Dag Sunde wrote:
    > "Tony" <> wrote in message
    > news:...
    > > Good Man wrote:
    > >> 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...
     
    Tony, Feb 14, 2006
    #9
  10. Dag Sunde Guest

    "Tony" <> wrote in message
    news:...
    > Dag Sunde wrote:
    >> "Tony" <> wrote in message
    >> news:...
    >> > Good Man wrote:
    >> >> 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.
     
    Dag Sunde, Feb 14, 2006
    #10
  11. Guest

    , Feb 20, 2006
    #11
  12. Dag Sunde Guest

    <> wrote in message
    news:...
    > 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.
     
    Dag Sunde, Feb 20, 2006
    #12
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    20
    Views:
    1,910
    d1srupt3r
    Mar 31, 2008
  2. darrel

    beginner AJAX questions (AJAX.net)

    darrel, Apr 27, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    2,444
    Flinky Wisty Pomm
    Apr 28, 2006
  3. jobs
    Replies:
    0
    Views:
    371
  4. =?Utf-8?B?QnJpYW4gRWR3YXJkcw==?=

    Deploying ASP.NET AJAX-Enabled Web site to host without AJAX insta

    =?Utf-8?B?QnJpYW4gRWR3YXJkcw==?=, Feb 20, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    606
    Patrick
    Feb 21, 2007
  5. minnie
    Replies:
    1
    Views:
    713
    Andrew Thompson
    Dec 13, 2006
Loading...

Share This Page