How To Update Multiple Page Elements Using The XMLHTTPRequest Object and JavaScript

How To Update Multiple Page Elements Using The XMLHTTPRequest Object and JavaScript

In the development of Ajax application many times we will encounter following issues.

1. The requiremnt to update multiple text boxes simultaneously.
2. Fill more that one dropdown list.
3. Update a combination of text boxes, dropdown lists and div tags.
4. Call different web pages and different webservices at the same time.

Imagine the case of a financial data site (such as a stock market info site) with various regions of the page used for displaying data any taking user inputs. We may want to populate fill numerous div tags, textboxes and dropdown lists with real time data. If we loop the several requests and we will also have to check for timeout, if timeout occurs and no data is returned, then we will have to fire the same request again.

It may end up that we have made 10 requests and 4-5 requests simply timeout because of network problems. If we dont loop then we will either get whole data or nothing (in which case there is only one more request to be made).

Continue Reading the Tutorial Here

No comments: