I'm very new here so I might be leading you in the wrong direction but I had
a similar problem and after days of research, I finally found the answer.  

Look at the response headers.  If the content type header contains
;charset={encoding} there seems to be a problem with IE.  Try removing this.
Keep the content type... just remove the charset.

Joe

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nathan
Tran
Sent: Monday, February 20, 2006 12:43 AM
To: rails-spinoffs@lists.rubyonrails.org
Subject: [Rails-spinoffs] [Prototype] onSuccess Event and Ajax.Updater bugin
IE

Hi all,

Is there a known bug with Ajax.Updater not working in
IE6? I'm having 
trouble with a Autocompleter control that calls a
function that contains 
an Ajax.Updater as an AfterUpdateElement callback.  It
works fine in 
firefox, but I don't think Ajax.Updater gets called
under IE.

http://pastebin.com/563889

   1.
      function updater(input, item) {
   2.
          var item_data =
item.getElementsByTagName('span')[0];
   3.
          var pars = 'item-data=' +
item_data.innerHTML + '&input-text='
      + input.value;
   4.
          new
Ajax.Updater('nutrients','fooddb/browser/nutrients',
      {method : 'get', parameters : pars, onFailure:
reportError,
      onComplete: reportComplete, onSuccess:
reportSuccess});
   5.
      }
   6.
                              function
reportError(request)
   7.
                                    {
   8.
                                           
alert('Sorry. There was an
      error.');
   9.
                                    }
  10.
                              function
reportComplete(request)
  11.
                                    {
  12.
                                           
alert('onComplete: ' +
      request.responseText);
  13.
                                    }
  14.
                              function
reportSuccess(request)
  15.
                                    {
  16.
                                           
alert('onSuccess: ' +
      request.responseText);
  17.
                                    }



If you look at that code, some how the response is not
being inserted 
into the 'nutrients' div by the updater.  Under IE the
onComplete event 
doesn't fire.  However, the request.responseText in
reportSuccess() 
contains the correct html response from the server.

Nathan.


        

        
                
__________________________________________________________ 
Find your next car at http://autos.yahoo.ca
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs




_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to