How can I get instance variable return from ajax on ruby..

in AJAX, there is responseText, responseBody, responseXML, responseStream, so I don't know what I can use to get instance variable return from ajax on ruby.. who can tell me, how can I do. Thanks!!

Thanks Daniel. in my case, I just want to get @searchresult.

In controller: search_controller .. def index ..some codes. end

def search @searchresult=Search.find(:all) some other codes. end

in views: search.rthml <div id="a">   <select id="a1"><option value="aa">aa <option value="bb">bb <option value="cc ">cc </select> <div id="result"> here just display @searchresult <====juse display @searchresult (1) </div> </div>

when I used AJAX, that means I changed selected, I got all the changed content, include index and search, displayed (1) so I don't know what I can use to get instance variable return from ajax. and I don't want to make XML file for this case. Just only want to get @searchresult to change view...