Home arrow JavaScript arrow Reading Data from an XML File for a Dynamic AJAX-based Banner System
JAVASCRIPT

Reading Data from an XML File for a Dynamic AJAX-based Banner System


Undeniably, AJAX has introduced a noticeable impact into the development of rich web applications, and consequently there are many enthusiastic web developers that continue discovering more and more creative uses for this powerful technology. Particularly, in this series of articles this "creativity" is focused entirely upon building an AJAX-driven banner application for displaying, on the browser, a certain number of banners via a few HTTP requests made in the background.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 6
July 31, 2007
TABLE OF CONTENTS:
  1. · Reading Data from an XML File for a Dynamic AJAX-based Banner System
  2. · Reintroducing the source files of the initial banner application
  3. · Fetching banner data from an XML file
  4. · Completing the improved AJAX-based banner application

print this article
SEARCH DEVARTICLES

Reading Data from an XML File for a Dynamic AJAX-based Banner System
(Page 1 of 4 )

Introduction

Having already introduced the subject of this series, it'd be useful to recall, at least briefly, the topics covered in the first article, so you can hopefully grasp much more easily the improvements that I plan to incorporate into the original banner application. In the preceding tutorial of the series, I went through the complete development of an AJAX-based program aimed at implementing a basic web-based advertising system. The system was comprised of a determined number of dynamic banners, displayed on the browser at a predefined time interval.

Of course, it's quite clear that one of the most straightforward methods for fetching contents (text and XML files, images, etc.) from the web server via AJAX at a predetermined interval of time involves creating a simple JavaScript timer, usually implemented via the popular "setTimeout()" method.

In this case, I used this useful JavaScript method as part of the banner application's logic to display the banners in a specified sequence over time, but as you might guess, this feature can be easily changed if you want to display the mentioned banners randomly, instead of using a fixed time interval.

So far so good. At this stage I firmly believe that the concepts involved in building this AJAX-based banner system have been properly understood, so it's time to speak specifically of the topics that I'm going to treat over the course of this second article of the series. In basic terms, I'm going to introduce some minor modifications to the original application (particularly within its behavior layer) so it can read all of the banner-related data directly from an XML file. In this way it will take advantage of the XML part exposed by the AJAX technology. Sounds pretty logical, right?

Hopefully, after you learn how to move all of the banner data to a simple XML file, you'll have at your disposal a fully-functional AJAX application that will be capable of displaying a set of dynamic banners fetched from the web server in the form of well-structured XML data.

So are you ready to see how implement this XML-based banner system with AJAX? Let's not waste any more time in preliminaries; let's begin now!


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- Project Nashorn to Make Java, JavaScript Wor...
- JavaScript Virus Attacks Tumblr Blogs
- Google Releases Stable Dart Version, JavaScr...
- Khan Academy Unveils New JavaScript Learning...
- Accessing Nitro? There`s an App for That
- JQuery 2.0 Leaving Older IE Versions Behind
- Fastest JavaScript Engine Might Surprise You
- Microsoft Adjusting Chakra for IE 10
- Brendan Eich: We Don`t Need Google Native Cl...
- An Overview of JavaScript Statements
- An Overview of JavaScript Operators
- Overview of JavaScript Variables
- More of the Top jQuery Social Plugins
- The Top jQuery Social Plugins
- More of the Top jQuery Slider Plugins

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials