None of that is trivial out-of-the-box. The last point sounds like an
optimization that isn't really necessary unless you experienced an
actual performance hit.

The second one isn't too hard to implement: Take a look at the source,
around this line:
http://dev.jquery.com/browser/trunk/plugins/autocomplete/jquery.autocomplete.js#L553
Thats where the list is created and where you'd need to check its
height and page position, and set a custom position relative to the
input.

I'm not sure about the first one. The autocomplete reacts to the
keydown event 
(http://dev.jquery.com/browser/trunk/plugins/autocomplete/jquery.autocomplete.js#L81),
so if you need to override it: Bind a keypress event before the
autocomplete and prevent bubbling in case of a paste event - maybe
that isn't even necessary, as long as you change the content of the
field before the autocomplete-event-handler sees it.

Regards
Jörn

On Sat, May 17, 2008 at 12:33 AM, rolfsf <[EMAIL PROTECTED]> wrote:
>
> One of our developers was working with the jquery Autocomplete plugin
> and asked about a couple things that I don't know of:
>
> Is there a way to hook into the event that sets the value of the
> textbox?
> Basically what I need to do is override the method that sets the
> textbox value with one of our own that calls our copy/paste setValue
> method so the autocomplete plays nicely with copy/paste.
>
> Also, is there a way to detect the bottom of the screen and reposition
> the list above the textbox?
>
> Finally ;-) is it possible to have a single, list container called by
> multiple textboxes? I notice that autocomplete appears to create a new
> list for each instance. We have multiple autocompletes on the same
> page that all pull the exact same data. It would be sweet to have a
> div set up for that purpose on pageload and reuse it, like we do with
> many of our modal dialogs.
>
> Thanks as always
>

Reply via email to