Hey all,
I'm using a very straight forward implementation of Autocompleter. My
constructor looks like the following:
document.observe('dom:loaded', function() {
new Ajax.Autocompleter('search_query', 'search_results', 'at.php', {
method: 'get',
paramName: 'typing'
});
})
Works great, makes a GET request to the server, and I can see my
responses coming back in Firebug. I can also inspect the DOM and see
the result sets there which is a bunch of styled <div> elements.
However, with that said, my 'search_results' div gets display:none;
appended to it inline via the Autocompleter class. Once the results
are in, it never shows the display.
Is there a reason for this? Why is it not setting it to display:block
once the results have finished their round trip?
Thanks,
/sf
on 14.05.2008 18:59
on 14.05.2008 19:08
I've noticed the same thing and was about to ask about it, so I don't think it's an isolated problem.
on 14.05.2008 19:37
I posted too soon, and I'll answer my own question here. The formatting that the Autocompleter class is looking for is very specific here. I was returning a result set wrapped in <div></div> elements, which scriptaculous is not found of. It is currently only working if you wrap your result set in an unordered list to display it. HTH, /sf