Bakki Kudva
2007-Aug-08 16:12 UTC
autocomplete field in ajax response html - css does not get applied.
Hi all, I have a page in which a div is updated with some html via Ajax. The returned html contains an autocomplete field. The autocomplete field works but the drop down results div does not get css applied to it so the selections don''t get highlighted when I use the up/down arrows and so I am unable to select from the drop down except for the first item. I have been looking at this in firebug for hours but can''t see the difference between a working autocomplete on a normal page and the one in an Ajax div. Any help/pointers/illuminations will be greatly appreciated. Thanks, bakki --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
bakki
2007-Aug-08 17:18 UTC
Re: autocomplete field in ajax response html - css does not get applied.
Solved! The problem was hinted at by the "$(element) has no properties" error I was getting in firebug. I then realized that the text_field was wrapped in <td></td> and the results <div> and the auto_complete_field were outside so prototype couldn''t find the elements. I just moved the </td> to the bottom of the <%= auto_complete_field ..... %></td> which solved the problem. -bakki On Aug 8, 12:12 pm, "Bakki Kudva" <bakki.ku...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > I have a page in which a div is updated with some html via Ajax. The > returned html contains an autocomplete field. The autocomplete field > works but the drop down results div does not get css applied to it so the > selections don''t get highlighted when I use the up/down arrows and so > I am unable to select from the drop down except for the first item. I > have been looking at this in firebug for hours but can''t see the > difference between a working autocomplete on a normal page and the one in an > Ajax div. > > Any help/pointers/illuminations will be greatly appreciated. Thanks, > > bakki--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---