Ajax "mind reader" script

I know next to nothing of coding, but I know how to embed what I'm asking for in html :)
I'd like to use jquery as I have it already in use in the site, but "plain JS" will work too. Can someone create a "mind reader" in ajax. I want what I type (rather the user types) on the form line to appear in the "results" at the bottom of the form. In addition to what was typed, I'd like to put other words next to that result, totally random words from a small list.

If the input was
"the slow turtle"
Below in the results window I'd like the same input, plus 20-30 other "results" derived from a short list.
the slow turtle       <--top result is "closest match" and what they typed in already
the slow turtle in a box <-- these are some f the "random" words appended to the end
the slow turtle is green
the slow turtle slow
the slow turtle the
the slow turtle turtle
the slow turtled
the slow turtles
the slow turtle the slow turtle
the slow turtle elturt wols eht

No matter what is typed in, it's output on the left (results), and on the right after each key press, some random word is appended to the right. If possible, I'd like some sort of "text mirroring" in the results. Like if I type in "blue" and "blue eulb" is one of the results, then typing in an extra letter "blues" would result in not seeing that former result at all anymore, but a whole new set (blues ist, blues asdf etc...)

Rules for the results are: After 4 characters are typed, the results "begin" to appear. Each letter added after will result in 20-30 new "results", each result contains everything typed in so far as the top result, and then 20-30 of the other "results" have words appended to them. Some results may just be the top result spelled backwards appended to it, or just doubled (blue eulb|blue blue).

It's part of a CAPTCHA system we're thinking about, but all I need is some proof of concept now and this would get that done for me. The word list will reside in a directory on the server in the same folder as the html page. Just use Lorem Ipsum words for now, see attached.

I hope it's clear enough what I want, makes sense to me but that doesn't mean it make sense :) If straight JS will do, use that, I just thought Jquery is popular and I have it available already too. Let me know what other questions you have I'll be happy to answer!
LVL 38
Rich RumbleSecurity SamuraiAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Scott Fell, EE MVEConnect With a Mentor DeveloperCommented:
If what you are after now is a proof of concept, that has been done via jquery for one. http://jqueryui.com/autocomplete/

You can program to start after n characters are typed.  The other magic as far as what is shown is dependent on the data.  You can  use the data in another file such as json/jsonp or from a database.  

It can search for any part of a word or phrase, just the left side or the right.
Scott Fell, EE MVEDeveloperCommented:
Just to add, I have also had success with typeahead as I work with bootstrap a lot  http://twitter.github.io/typeahead.js/
Rich RumbleSecurity SamuraiAuthor Commented:
Thanks, but I can't code :) I have no idea how to do this, or use either of those libraries. The first looks closest, and I know it seems like how google or other sites try to predict, but it's not what I'm after. It's outputting what was input, and appending random words, or random manipulations to the end of the words.
It is close to auto-completing, but different. I don't know how to programatically change the JS to do what I described. I've tried various fiddles and auto-completes on http://jsfiddle.net/ but I have no idea what I'm doing, and just break the scripts beyond repair.
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Scott Fell, EE MVEDeveloperCommented:

We are happy to help you, but not write the code for you.   We can give you the start and help solve issues in your code that you do have.  But you are asking for both logic and  programming and this is not the place to get free work.    

>but I have no idea what I'm doing

You will need to hire somebody to do this for you.

fyi, I did try and look at your jsfiddle but it is blank.
Rich RumbleSecurity SamuraiAuthor Commented:
I get this help all the time here :) Just not JS, typically VBS/PHP or Perl. I'll wait for another expert, thanks!
Scott Fell, EE MVEDeveloperCommented:
>I've tried various fiddles

The fiddle you did point to is empty.  Which one was close?
Writing a few lines of VB to scan a directory is not the same as writing a full blown autocomplete with many other factors to take into account and program for.
If it is outside of your programming capabilities then you need to hire a programmer.
You are a member here long enough to know this is a two way street and not a gimme, gimme.
It is expecting too much to expect someone to spend hours doing your work for you for no recompense but a B grade.
You asked for proof of concept and Scott gave you the concept with the jQuery autocomplete.
Rich RumbleSecurity SamuraiAuthor Commented:
I link I may have over complicated it...I thought %input + %rand sounded simple enough to a seasoned programmer and wouldn't constitute a whole class or hours of work. I can see it in my head like this:

form_line = %input
if $input =>4 then
<!--(rand is some of the words from a txt file in the local dir, or in an array?-->
echo %input + %rand 1
echo %input + %rand 2
echo %input + %rand 3
echo %input + inverse(%input)
echo %input + %input
echo %input + %rand 5
echo %input + %rand 6
echo %input + %rand 7

It "looks" easy to me, am I over simplifying it? Does that make the task seem like less? I certainly don't want to "get something for free". I thought it sounded "simple enough" is all.
It doesn't have to be "true ajax", just look that way I guess? Each key-press results in new "results" like the above. That is the "ajax" part is each key-press.
Rich RumbleSecurity SamuraiAuthor Commented:
I'm getting random words on the end of what is typed. I mashed up two other fiddles I found. What it needs are more lines in the textarea, with more random words. That I can't seem to get yet. Again it's echoing the first result, I'd like it to echo 10 or more as well.
It didn't take me too long once I found some code that was working, I just don't know the next function or call to make.
All Courses

From novice to tech pro — start learning today.