Hi,

I'm surprised it works in IE7, on the face of it it should run into
the Same Origin Policy[1] (unless, of course, your page is loaded from
http://search.yahooapis.com).  On the off-chance that Yahoo was
implementing the new CORS[2] stuff, I tried it, but with IE7 I got an
Access Denied exception (which is as expected).  With FF3.5 and
Chrome2 I got blank responses.  (And if Yahoo were implementing CORS,
FF3.5 should work, as it supports that -- I don't think IE7 does.)

[1] http://en.wikipedia.org/wiki/Same_origin_policy
[2] http://www.w3.org/TR/access-control/
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Aug 27, 3:49 am, emooney <[email protected]> wrote:
> Alex,
> When I try this code, the only line I replace is:
>
> var request=new Ajax.Request('./load_test.html?x=2345',{
>
> for this
>
> var request=new Ajax.Request('http://search.yahooapis.com/
> ImageSearchService/V1/imageSearch?
> appid=YahooDemo&query=Madonna&output=json',{
>
> I get "no response text" in FF 3.5.2 and in Chrome 3.0.195.6, but it
> works in IE 7.
> I've been trying to get this to work for a couple of days now and
> don't know what else to try.
>
> Thanks,
> Eric
>
> On Aug 7, 4:14 am, "Alex McAuley" <[email protected]>
> wrote:
>
>
>
> > Just change the script to adjust a little
>
> >http://pastie.org/575168
>
> > HTH
>
> > Alex Mcauleyhttp://www.thevacancymarket.com
>
> > ----- Original Message -----
> > From: "Krish" <[email protected]>
> > To: "Prototype & script.aculo.us" <[email protected]>
> > Sent: Friday, August 07, 2009 5:18 AM
> > Subject: [Proto-Scripty] Detecting failure
>
> > > This maybe anewbiequestions but I am having some trouble with this.
>
> > > 1. I would like use prototype to make an ajax call to load a page ..
> > > grab a particular div target_div
> > > from that page and stick it into a destination div dest_div on this
> > > page.
>
> > >   $("#dest_div").load("load_test.html #target_div img");
>
> > > Is there something similar for prototype?
>
> > > 2. If load fails, I want to put some default content that can be on
> > > this page.
> > > I am having detecting load failure. The exception handlers in
> > > makeAjaxCall don't work properly.
> > > Whats the best way to detect failure in a cross browser way?
>
> > > Thanks in advance,
> > > Kris
>
> > > ------------------- my test page
> > > <html>
> > > <head>
>
> > > <script type="text/javascript" src="prototype-1.6.0.3.js"></script>
> > > <script type="text/javascript" >
>
> > > function makeAjaxCall()
> > > {
> > > alert();
> > > new Ajax.Request('./load_test.html?x=2345',
> > >   {
> > > method:'get',
> > > onSuccess: function(transport){
> > >   var response = transport.responseText || "no response text";
> > >   alert("Success! \n\n" + response);
> > > },
> > > //onFailure: function(){ alert('Failure: Something went wrong...') }
> > > onException: function(){ alert('Exception: Something went
> > > wrong...') }
> > >   });
> > > }
> > > </script>
> > > </head>
>
> > > <body onload="javascript:makeAjaxCall();">
> > > <div id="dest_div"></div>
> > >  original page.
> > > </body>
> > > </html>
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to