This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
First of all, the fact that the page was generated by a JSP is irrelevant. Once the response gets to the browser, it's just an HTML page like any other.
You'll also need to explain what you are trying to do with more clarity. It's not clear what you are trying to do. Are you asking how to execute two functions upon receiving the response of an Ajax request? Some thing else? How do the text fields that you mentioned factor into this?