One of the least user friendly features of most websites is forms. The longer the form, the more annoying it gets. However, a new technology called AJAX (that has nothing to do with household cleansers!) can help.
XML in the Browser: Submitting forms using AJAX - The XML in HTTPRequest (Page 3 of 6 )
Though this object has XML in its name, it doesn't necessarily have to use XML. If you wish to use it in an entirely cross platform way, however, consider that currently Apple's Safari requires that the response from the server be of the text/xml mimetype.
This may or may not impact your application design. It isn't hard to set up an XML formatted response and code to use the XML data once it's received, but if you were planning on sending text strings only back and forth, this is something to consider. It's likely that the next version of Safari will not have this problem, and working around it is nothing compared to most cross browser DHTML problems. Sending information as a string, on the other hand, works in all platforms and browsers that support the request object.
The fact that the request object supports XML allows it to be the gateway for a number of XML based message formats, such as SOAP and XMLRPC, or your own custom solutions. Because the request object uses HTTP, you could also use it with WEBDAV if you were so inclined. If you are only retrieving XML from the server and not sending anything, you can even use AJAX without a server side application platform. The implementation details are up to you, but the tools are there.
The Event Handler
Whatever event handler function you specify should check for two things. The first is the readyState property. If readyState is 4, then the response has been completely recieved. You then need to check the status property of the request object to determine whether the request was successful. If the value of status is 200, any data that was sent back as a response is ready for use. If status is something other than 200, you will be able to display the error by using the statusText property.
The response, as mentioned before, can be a simple text string or an XML document DOM (Document Object Model). The two request object response properties you will use for working with a response are responseText and responseXML. The DOM object stored in responseXML is a completely accessible DOM that can be manipulated and traversed in the same way that your HTML document can be. The responseText property is used when a simple text string is sent by the server.