How can I generate a result in a textbox using jquery and ajax from a textbox also

How can I generate a result using jquery + ajax in #response text box from a data textbox

<form action="someanotherpage.php">
   <input type="text" name="data" value="" id="data"/>
  <input  type="text" name="response_here" value="" id="response"/>

I need to use the data to query it in a database then display the result in the #response

if my question was confusing please let me know

any suggestion guys?is it possible?any help is appreciated. thank you.