the use of XmlHttpRequest to communicate with the server asynchronously in the background, and populating the page by manipulating the DOM tree. So the page can be updated without refreshing the whole page, giving you things like instant validation and really dynamic screens..
They took it even a step further in creating a behavior (htc file) which they attached to HTML tables. In this way the tables act like multi record blocks in Oracle Forms. The table remains in place and only data change, complete with scrolling. Really cool. Changes in data are cached in an XML object clientside until the save button is pressed. The records are then posted to the server again using the XMLHttpRequest. There the posted XML is handled by a generic “XML to Table data converter”.
Now that it has become mainstream I can see a lot of good uses for it. Indeed validation, dynamic screens but also for example coordinated select list and “smart forms” (completion of entered values). An excellent little example and great introductory tutorial on XmlServletRequest can be found here
It shows how based on a zip code, city and state are filled in in the onblur event of the zip code textfield
Interestingly enough the response to an XmlHttpRequest does not have to be XML …
8 thoughts on “XmlHttpRequest – blast from the past or future”
But be aware, there may be more going on than you know. Look at this article called “Using the XMLHttpRequest Object and AJAX to Spy On You” (http://www.devx.com/webdev/Article/28861).
I feel that AJAX and the XMLHttpRequest makes sense for a smaller set of functionality: the bulk of the webpages will continue to be generated by JSPs. However, validation, conditional population of select-items, step-by-step build up of a tree (navigator), refresh of the contents of a table (re-sort, next range-set), etc. will allow for a seemingly more dynamic, more responsive HTML user interface.
Gmail current tells you that your username password combination is incorrect without reloading the page. It is very refreshing.
One fascinating application of this is a login system without the traditional page refresh.
I can’t wait to see XMLHttpRequest in action more often redefining the traditional web interface.
I suppose the real news is that both of the two big browsers are supporting it and that some big players are starting to use it. This means defacto standard coming up and any browser that want to be anything in the future is going to have to support it.
isn’t this what google suggest is doing? http://www.googlemania.com/noticias.php?1070&Google+Suggest+Dissected
I had seen one great search engine script which works using this method but cant remember it now 🙁
Some live examples here – http://www.fiftyfoureleven.com/resources/programming/xmlhttprequest/examples
I found an interesting introduction to the XMLHttpRequestObject at Dynamic HTML and XML: The XMLHttpRequest Object (5th December 2004)
Comments are closed.