SunQuest
 
       JavaScript
  Home arrow JavaScript arrow Reading Data from an XML File for a Dynami...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Reading Data from an XML File for a Dynamic AJAX-based Banner System
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2007-07-31

    Table of Contents:
  • Reading Data from an XML File for a Dynamic AJAX-based Banner System
  • Reintroducing the source files of the initial banner application
  • Fetching banner data from an XML file
  • Completing the improved AJAX-based banner application

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

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


    (Page 1 of 4 )

    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.

    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!

    More JavaScript Articles
    More By Alejandro Gervasio


       · Over the course of this second tutorial of the series, the initial banner...
     

    JAVASCRIPT ARTICLES

    - Detect Browser Compatibility with the Reques...
    - Using the EXT JS Date Picker Widget
    - Ajax Hack for Entering Information Without R...
    - EXT JS 2.1 Overview
    - Using the Style Object for Zebra Tables with...
    - Binary Searching
    - An Improved Approach to Building Zebra Tables
    - Assigning Background Colors Dynamically to Z...
    - Building Zebra Tables with CSS and JavaScript
    - JavaScript: Array Objects
    - A Closer Look at Smart Markers with Yahoo! M...
    - Using Polylines and Smart Markers with Yahoo...
    - Bulleted Menu of Links
    - Creating Click Loggers and Basic Markers wit...
    - Adding Pan Controls to Yahoo! Maps







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway