I find onSuccess and actually onLoading to be quite unreliable. I
stick exclusively to onCreate and onComplete (in which you can switch
on the response.status - anything starting with 2 is good). I can
guarantee you won't have any problems with this approach, and I know
other people have reported issues with onSuccess and onFailure even
though the API reccommends their use over branching on the status
within onComplete.

On Sep 17, 12:48 pm, david <[EMAIL PROTECTED]> wrote:
> Hi Nelson,
>
> you could try the onComplete event for the ajax request, perhaps it
> handle more case than just onSuccess ?
>
> --
> david
>
> On 17 sep, 03:07, "Diogo Neves" <[EMAIL PROTECTED]> wrote:
>
> > On Tue, Sep 16, 2008 at 10:26 AM, Nelson Lim <[EMAIL PROTECTED]> wrote:
>
> > > Hi guys,
>
> > > I'm new to prototype. I've been using it to load a panel by writing
> > > what I get from pd_builddetails.html into a div tag using innerHTML.
> > > This works fine with firefox, but on IE6, its a little unpredictable.
> > > I have it working sometimes, but after awhile of clicking around, it
> > > seems to be "loading" for a very looong time.
> > > Closing the browser and restarting it again, seems to solve this
> > > problem. Anyone experience this before?
>
> > > Thanks in advance!
>
> > > Nelson
>
> > >  //Loads the Build Details Panel
> > >    function loadBuildDetails(buildID){
> > >                 new Ajax.Request('pd_builddetails.html',
> > >        {
> > >            method:'get',
> > >            parameters: {buildID: buildID },
> > >            onLoading: function() {
>
> > > document.getElementById("builddetails_panel").innerHTML="<p><IMG
> > > src='images/spinner.gif' border=0 align='left' height=16
> > > width=16><STRONG>&nbsp;Loading...</STRONG>"
> > >            },
> > >            onSuccess: function(transport){
> > >               response = transport.responseText || "no response
> > > text";
> > >               //response = response.trim();
>
> > > document.getElementById("builddetails_panel").innerHTML=response;
> > >            },
> > >            onFailure: function(){ alert('Something went wrong. with
> > > build details panel..') }
> > >        });
> > >    }
>
> > Hi, it seams fine to me, except that the <p> doesn't close...
> > And plz, don't use 'document.getElementById('xxx')' on prototype... it seams
> > ugly compared with '$('xxx')'
>
> > --
> > Thanks,
>
> > Diogo Neves
> > Web Developer @ SAPO.pt by PrimeIT.pt
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to