Hi,

I know that ncubica's actual problem has been solved via JSONP, but
just for clarity:

On Jun 24, 6:53 pm, David Behler <d.beh...@gmail.com> wrote:
> Hi Nahum,
>
> as far as I know Firefox does not allow for cross-domain AJAX requests.

Firefox does indeed allow cross-domain requests, it was one of the
first browsers to support the standard for them (CORS[1]). The problem
is that (apparently) Flickr doesn't support CORS at the server end. A
bit surprising, since they support JSONP, but JSONP is older and
easier on their servers (CORS would typically involve two requests
rather than one -- the OPTIONS request asking for access, and then the
actual GET or POST).

JSONP is also preferred over CORS right now because IE6&7 don't
support CORS at all, and IE8 supports it only with special client-side
code using XDomainRequest (instead of transparently in XMLHttpRequest,
the way Chrome, Safari, and Firefox do). (They think a clean break
with the XMLHttpRequest object is a better way to go.[2])

[1] http://www.w3.org/TR/access-control/
[2] 
http://msdn.microsoft.com/library/cc709423.aspx#xdomainsec_secconcernswebapiwg
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com

On Jun 24, 7:16 pm, ncubica <ncub...@gmail.com> wrote:
> and the JSONP works at least for flickr... thanks for the support =)
>
> On Jun 24, 12:53 pm, David Behler <d.beh...@gmail.com> wrote:
>
>
>
> > Hi Nahum,
>
> > as far as I know Firefox does not allow for cross-domain AJAX requests.
>
> > What you could to is to request a php file on your server and that php
> > file does the call to the Flickr API.
>
> > David
>
> > Am 24.06.2010 19:47, schrieb ncubica:
>
> > > Hi every body I have a weird issue I been working with the Flickr API,
> > > in Flickr for make a connection with the server is through url format
> > > in my case something like this
>
> > >http://api.flickr.com/services/rest/?method=flickr.photosets.getList&;...
>
> > > If your run into any browser you are going to get a flickr function
> > > and is ok, but Im trying to obtain with Ajax Im doing something like
>
> > >      new Ajax.Request('http://api.flickr.com/services/rest/?
> > > method=flickr.photosets.getList&api_key=10cb3dccaa050efebdc01540c1d4d227&us
> > >  er_id=51390...@n07&format=json',
> > >    {
> > >      method:'get',
> > >      onSuccess: function(transport){
> > >          debugger;
> > >        var response = transport.responseText || "no response text";
> > >        alert("Success! \n\n" + response);
> > >      },
> > >      onFailure: function(){ alert('Something went wrong...') }
> > >    });
>
> > > And is working good in IE the response have what you can see in the
> > > url of flickr but in Firefox I dont know why Im getting in the
> > > responseText a blank string "". does any have any clue what am I doing
> > > wrong?
>
> > > Thanks
> > > Nahum

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to