observing textfields in a form (AJAX)

I have a problem and I don't know where to begin with (yes, I'm a
newbie ;-)):

I have an application that holds a graph (with nodes and edges). In
the view the user enters data that is then converted to nodes and
edges: Every formfield-value (in the view) represents a node. I want
the user to use existens nodes if possible, so I'd like him be able to
see suggestions of neighbouring node-names as soon as enters data in a
formfield and changes to another one. It should be a little like the
suggestions you get when you post an url to del.icio.us.

---view (form)---

---model (method)---

...the model-method mentioned outputs an array of strings like the
=> ["a_node_name", "another_node_name", "some_node_name"]

Can anyone point me to some example code where something similar is
being made or to a useful documentation? Kind of got no clue where to

Thanks a lot!