From: gregarican Date: 2005-06-11T10:30:28+09:00 Subject: Ruby way of handling this? This is a Rails-related question. I have several RHTML input forms which have select drop-downs. My endusers complain that some of the drop-downs are a bit lengthy to go through, since they can only type in the first character of the select option and still have to scroll through the choices under that. Looking around the Internet I found some sample Javascript code that will allow type-ahead so that each subsequent character of the select option can be typed in order to narrow down the options. Below is a snippet of the Javascript that accomplishes this: ---------------------- ---------------------- I call this function by including the following code in my RHTML page: ----------------------
Select the employee initials:

.... ---------------------- Obviously the Javascript cannot parse what the Rails variable amounts to. What would be a Ruby way of handling this to pitch the Javascript altogether? Apologies if this is a bit off-topic. Figured there are a lot of bright minds on this list and my bulb is a bit dim at the moment :-)