John Woods
2009-Sep-23 03:21 UTC
auto_complete text field not showing drop-down box properly
This may be more of an Ajax question than a Rails question, but I''m pretty new to Rails and know approximately zero JS. I''d love if someone could give me a little direction. I''m using pat shaughnessy''s nested text_field_with_auto_complete plugin, and it seems to be *mostly* working properly (after many hours of fiddling). However, the drop-down box is not displayed properly. Instead of rendering a box with items that can be highlighted, it''s just rendering a bulleted list. I can still click on items in the bullet list, and they''ll fill in the box properly. They also fade away if I go do something else for too long. I don''t even know where to begin to look. Many thanks, John
Mark Mr
2009-Sep-23 16:25 UTC
Re: auto_complete text field not showing drop-down box properly
this might sound weird, but in your view of the list try putting everything on the same line i.e.: <ul> <li> somthing </li> <ul> Becomes: <ul><li>something</li></ul> I think I remember that fixing my problem, although it might not work for you. -- Posted via http://www.ruby-forum.com/.
John Woods
2009-Sep-23 19:35 UTC
Re: auto_complete text field not showing drop-down box properly
Hi Mark, Thanks. I''ll give that a try, but it seems strange that it should even happen; my view is simply: <%= auto_complete_result @campuses, :name %> Shouldn''t that be formatting it correctly? On Sep 23, 11:25 am, Mark Mr <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> this might sound weird, but in your view of the list try putting > everything on the same line i.e.: > > <ul> > <li> > somthing > </li> > <ul> > > Becomes: > <ul><li>something</li></ul> > > I think I remember that fixing my problem, although it might not work > for you. > -- > Posted viahttp://www.ruby-forum.com/.
Bryan
2009-Sep-23 20:22 UTC
Re: auto_complete text field not showing drop-down box properly
Sounds to me like you''re missing styling. I use http://github.com/grosser/simple_auto_complete that comes with an example CSS that works just fine for me. That might give you some clues, but you''ll probably have to modify it to work with the provided classes and ids.
John Woods
2009-Sep-24 20:05 UTC
Re: auto_complete text field not showing drop-down box properly [SOLVED]
Found the problem! I was using :skip_style => true in the options for the text field. When I change that to false, it loads correctly. Thanks! John On Sep 23, 3:22 pm, Bryan <bryan.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Sounds to me like you''re missing styling. > > I usehttp://github.com/grosser/simple_auto_completethat comes with > an example CSS that works just fine for me. That might give you some > clues, but you''ll probably have to modify it to work with the provided > classes and ids.