Scriptaculous - auto complete textbox with a drop down


#1

Hi,

I’m using scriptaculous to provide an auto complete textbox - and it
works perfectly - but I was wondering if there was anyway to let users
navigate the choices using the keyboard i.e the curor keys as opposed to
having to use the mouse? Apart from that it’s perfect! :slight_smile:

Cheers,

Pete


#2

On Friday, May 26, 2006, at 2:45 PM, Pete wrote:

Pete


Posted via http://www.ruby-forum.com/.


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

I have been using the auto_complete fields and I think they already do.

_Kevin


#3

Kevin O. wrote:

On Friday, May 26, 2006, at 2:45 PM, Pete wrote:

Pete


Posted via http://www.ruby-forum.com/.


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

I have been using the auto_complete fields and I think they already do.

_Kevin

Just tried it on my mac and linux and it works fine… maybe just my IE
playing up? :S

Different issue now though - I want to update the rest of the form when
the user tabs out of the autocomplete box. Normally I’d do this with
onBlur() but not sure how to set that up if using the helper methods.
Has anyone done this already?

Cheers,

Pete


#4

On Friday, May 26, 2006, at 3:17 PM, Pete wrote:

removed_email_address@domain.invalid
the user tabs out of the autocomplete box. Normally I’d do this with
Posted via http://www.ruby-forum.com/.


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

How about a field observer?

_Kevin


#5

On Wednesday, July 12, 2006, at 2:16 PM, Damon H. wrote:

However, if the user types and the correct item is highlighted in the auto
:with => “‘supplier=’+$F(‘supplier_company_name’) + ‘&order_type=’+‘T’”) +

_Kevin
Cheers,

removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

On my dev box (Firefox, OS X), the tab button tells the TFWAC to use the
selected item as you might expect.

_Kevin


#6

Pete-

I am curious about this as well.
I have several text_field_with_auto_complete fields in some forms that
are
heavy data entry intensive.
The auto complete fields allow the user to start typing a name and then
when
chosen the address is automatically filled in for them.
Everything works great if the user uses the moust to select the item
from
the auto complete list.
However, if the user types and the correct item is highlighted in the
auto
complete list, they want to be able to TAB to the next field and the
application complete the address just as if they had selected the entry
with
the mouse.

Here is an example of my TFWAC:

<%= text_field_with_auto_complete :supplier, :company_name, { :size =>
“45”
}, :after_update_element => “function(element,value){” +
remote_function( :url => { :action => :get_supplier_address
},
:with => “‘supplier=’+$F(‘supplier_company_name’) + ‘&order_type=’+‘T’”)
+
“}” %>

Is there a way to tell the TFWAC to use the highlighted item in the auto
complete list when the user hits the TAB key?

Any help would be appreciated on this.

Thanks,
~d

On 26 May 2006 13:25:30 -0000, Kevin O. <