Paul said:
It would be very helpful if you were to post your code and ask specific
questions about problems you are having with your code.
onblur() needs to invoke a javascript function. That function should:
do an HttpXmlRequest call to the server, see if it gets a usable
response, and set the input field's 'value' property to the returned
value if good.
Give your input elements unique id attributes. Makes it easier to
locate them. Then (assuming the use of prototype.js) you can do
$(theInputID).value = theReturnedGoodValue in the callback method.
Hand-coding the javascript for this is pretty straightforward, but if
you get stuck, ask for help on a JavaScript list. It's off-topic for
the main Ruby list.
If you are looking to use Rails helper methods or RJS, you would do
better to ask for help on the Rails list.
--
James Britt
"Programs must be written for people to read, and only incidentally
for machines to execute."
- H. Abelson and G. Sussman
(in "The Structure and Interpretation of Computer Programs)