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" <webmas...@thecarmarketplace.com>
wrote:
> Just change the script to adjust a little
>
> http://pastie.org/575168
>
> HTH
>
> Alex Mcauleyhttp://www.thevacancymarket.com
>
>
>
> ----- Original Message -----
> From: "Krish" <ilaymy...@yahoo.com>
> To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com>
> 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 prototype-scriptaculous@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