Fetching XML Data from the Server for an AJAX Headlines System
(Page 1 of 4 )
Have you been trying lately to add a touch of interactivity to your existing website with AJAX? Then hopefully this series will catch your attention quickly! Welcome to the final installment of the series “Building a headlines system with AJAX.” In two parts, this series teaches you how to create a highly expansible application that displays dynamic headlines on a web page by using the powerful features of AJAX.
Introduction
Undoubtedly, when it comes to finding new ways to apply the great capacities of AJAX-based technology, possibilities are not only numerous, but exciting. True to form, the conditions offered by this new development scenario provide web developers with a huge range of applications that were unimaginable a few years ago. These days, it’s commonplace to see how web-based email systems or even many front ends implemented by some search engines behave like true desktop applications, all inside the context of a web browser.
However, in this case I’ll be a little more moderate and keep the usage of AJAX limited to building the headlines system that I mentioned earlier, which consists of an application worthwhile to include on any website that wants to empower its visitors’ experience.
Returning to the first part of the series, hopefully you’ll remember all the steps that I followed to construct not only the presentation layer of the application, that is the CSS styles and structural (X)HTML markup respectively, but the bunch of JavaScript functions aimed at fetching headlines in the background with no page reloads.
In addition, you should recall the fact that all the data to be displayed on the browser was initially retrieved from an XML file, which until now remains undefined. Over the course of this last article, I’ll show you how to create this file, in this way completing the AJAX-driven headlines system.
This experience will reaffirm your background on how to work with HTTP requester objects, as well as possibly fill some gaps concerned with fetching XML data with JavaScript. So, that’s what we’ll learn in this article. Let’s get going!
Next: A brief look back at the client-side code >>
More JavaScript Articles
More By Alejandro Gervasio