I am trying to build something like an auto complete list to work with
an input field. The input field I am using has a size smaller than the
maxlength of the values it can hold.
As the user types characters, I search against a list and display the
first match value in the field. But what I want is that the untyped
part of the matching string be selected. For eg: say the user is
typing 'How' and the first match is 'How are you my friend'. I would
like to show this value to the user but have ' are you my friend'
selected. I am able to do this using text range.
My problem is that the input field is only of size say 12. So it will
not be able to show the entire text. When I populate and select the
range as described above the data scrolls to the end and the begining
of the entire string is not visible in the viewport.
What I would like to achieve is this:
Update the value of the input field to ''How are you my friend'' and
select ' are you my friend' BUT
have 'How are you ' showing in the input viewport and not scroll till
the end.

Can anyone explain to me how I can achieve this. A sample code will


You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to