Well... T.J.

I gave up... :-)

My deadline for this website was last friday. I've put the old
GetXMLHttp function to handle the container update. Its not good
looking but its working at least. The problem was the "Acess Denied"
on IE7.

But, anyways, thanks for your time!
see ya



On 8 jun, 18:29, Rodrigo Ramos <rodrigoramos...@gmail.com> wrote:
> Hi T.J., thanks for help!
>
> Well, i've made the changes you told me to do, including the var
> name :-)
> Visualy nothing happend :(
>
> I've tried the Ajax.Updater... tried the update()... tried the
> onSuccess instead onComplete...
> All of this is too valid, but nothing changed at the end.
>
> Could it be anything in HTML code? Like a header missing... wrong
> doctype... I dont know, just guessing
> Remembering: its working fine in FF. But the s*** of Internet Explorer
> simply dont work.
>
> The only handler that executes something is the onCreate. Nothing on
> onFailure and onException.
>
> =SSS
>
> Regards.
>
> On 8 jun, 04:06, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
>
> > Hi Rodrigo,
>
> > I see two problems there, and separately I have two suggestions.
>
> > The problems are:
>
> > 1. You're using the onComplete handler.  onComplete is fired when the
> > request is complete for *any reason*, even if it failed.  You probably
> > only want to do this when the request is successful, which is the
> > onSuccess handler.  (You probably also want to have an onFailure
> > handler so you can tell the user that the request failed; it may be
> > worth looking at this article[1] on the unofficial wiki.)
>
> > 2. You don't want the 'this' in this line:
>
> >     $('conteudo').innerHTML = this.originalRequest.responseText;
>
> > Just use:
>
> >     $('conteudo').innerHTML = originalRequest.responseText;
>
> > ...or even better, using Element#update[2]:
>
> >     $('conteudo').update(originalRequest.responseText);
>
> > Okay, the suggestions:
>
> > A) Your variable name "originalRequest" is misleading, because it's
> > not the request.  It's an Ajax.Response object.  I suggest the name
> > "response". :-)
>
> > B) Use Ajax.Updater[3] instead of Ajax.Request.  Ajax.Updater does
> > almost exactly what you're doing.
>
> > [1]http://proto-scripty.wikidot.com/prototype:how-to-bulletproof-ajax-re...
> > [2]http://prototypejs.org/api/element/update
> > [3]http://prototypejs.org/api/ajax/updater
>
> > HTH,
> > --
> > T.J. Crowder
> > tj / crowder software / com
> > Independent Software Engineer, consulting services available
>
> > On Jun 8, 4:03 am, Rodrigo Ramos <rodrigoramos...@gmail.com> wrote:
>
> > > Hey guys,
>
> > > i'm having a trouble with the Ajax.Request method in my code. Could
> > > you guys help me out?!
>
> > > Here is the thing: I have a simple html website and i'm just trying to
> > > "change" things using Ajax. The problem is that its working only in
> > > FF. On IE simply doesnt work. And, as usual, no error message =S. I'm
> > > using the 1.6.0.3 version.
>
> > > I've already tried to debbug printing some alert's inside the method
> > > but nothing happend. The object its created (i've put an alert on
> > > "onCreate") but the .html file never show on screen.
>
> > > You guys have any ideia of what could it be?
>
> > > code:
> > > function ajax(url){
> > >         var myAjax = new Ajax.Request('conteudo/'+url+'.html', {
> > >                 method : 'get',
> > >                 onComplete: function (originalRequest){
> > >                         $('conteudo').innerHTML = 
> > > this.originalRequest.responseText;
> > >                 }
> > >         });
>
> > > }
--~--~---------~--~----~------------~-------~--~----~
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