Autocomplete field in ajax response html - css does not get

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

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

and the results
and the auto_complete_field
were outside so prototype couldn’t find the elements. I just moved the to the bottom of the <%= auto_complete_field ..... %> which solved the problem.

-bakki