Victor F. wrote:
I am new to ruby and rails and am unsure how to accomplish the
I’d like to have a page where the user enters a value in a form field
and have results stream into a results div on the page. Additionally, I
- Not limit the result set
- Allow user to get immediate feedback on what they have entered
- Allow user to change field contents as results are appearing
- Have query restart when field value changes
Can anyone point me to an appropriate reference or suggest Rails
constructs to research?
Thanks in advance.
Take a look at the “Agile Web development with Rails” book, there is a
section about Ajax and one of its example is “Build Real-time searches
Hope this helps
Thanks, I’ve looked at that and implemented something using this
construct, but with large result sets, there is too long a delay before
the data appears. And when it does, it’s all at once. I’m wanting to
view in real time the data being found. A simple meaningless example
would be that each record contains a number 1 to a million. When the
user starts typing a 1, the results would include 1, 10-19, 21, 31, 41,
etc. and would continue to be added to if the user typed nothing else.
If the user adds another 1, then the results box starts over -
displaying 11, 110, 111, 112, 113, etc. and again continues.
Any ideas how that can be accoumplished?