You can add AJAX functionality to an InfoPath form through
the use of the XMLHTTPRequest object. The InfoPath form can use this object to
send requests to a web server, which in turn does some work - e.g. updates the
underlying data store of a secondary data source as discussed in this article -
and returns a response in XML format to the InfoPath form. Since AJAX calls are asynchronous, the user can continue using the InfoPath form, while the
server is doing its work. When the call returns, InfoPath can pick up the XML
data returned by the server and load it into part of or the entire InfoPath
form or just refresh the updated data in a secondary data source.