Generalized AJAX Response Handling for XML Content
Making multiple simultaneous asynchronous requests in AJAX applications using the XmlHttpRequest object can be difficult, but this generalized XML response-handling code will help.
by Matt Warden
July 18, 2005
JAX is catching on, but handling multiple XML responses on the client side is difficult. Current methods of easing the hassle ignore important programming principles that are known to help avoid maintenance headaches down the road. This article presents an elegant method of handling any number of XML responses in an AJAX application, while adhering to the principles of abstraction and encapsulation.
The ability to asynchronously transfer XML documents between the client and server without refreshing the entire page opens up an entire field of possibilities for browser-based Web applications. Indeed, it changes the way you can and must think about Web applications, because new problems arise from asynchronous communicationsespecially when using the XMLHttpRequest and XMLHTTP objects. In this article, you'll explore some of these issues and develop an elegant method for handling them, all while adhering to important programming principles.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!