JavaScript
  Home arrow JavaScript arrow Page 2 - Fetching XML Data from the Server for an A...
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  
Mobile Linux 
App Generation ROI 
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

Fetching XML Data from the Server for an AJAX Headlines System
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2006-09-26

    Table of Contents:
  • Fetching XML Data from the Server for an AJAX Headlines System
  • A brief look back at the client-side code
  • Listing the complete client-side code of the application
  • Creating an XML file for storing data

  • 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


    Fetching XML Data from the Server for an AJAX Headlines System - A brief look back at the client-side code


    (Page 2 of 4 )

    Before I start showing you how to create the proper XML file from which all the headlines will be extracted later on, let me first take a brief look at some of the core modules of the applications that were initially defined in the first part of the series. Doing so, it’ll be much easier to for you to understand how this XML file fits into the overall context of this headlines system.

    Given that, here is the complete source code that corresponds to the structural (X)HTML markup and CSS declarations respectively, which in conjunction render the appropriate front end of the application. Please, have a look at the web document below.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-
    8859-1" />
    <title>AJAX-BASED NEWS SYSTEM</title>
    <style type="text/css">
    body{
                margin: 0;
                padding: 0;
                background: #fff;
    }
    p{
                text-align: center;
                font: bold 24px Arial, Helvetica, sans-serif;
                color: #000;
    }
    p{
                font: bold 18px Arial, Helvetica, sans-serif;
                color: #009;
                text-decoration: none;
    }
    #headlinescontainer{
                text-align: center;
                width: 400px;
                height: 300px;
                margin-left: auto;
                margin-right: auto;
                background: #eee url(bg1.jpg) top center repeat-x;
                border: 1px solid #000;
    }
    #headlinescontainer img{
                border: 1px solid #666;
    }
    #controlpanel{
                text-align: center;
                width: 400px;
                height: 30px;
                padding: 5px;
                margin-left: auto;
                margin-right: auto;
    }
    </style>
    </head>
    <body>
    <p>AJAX-BASED NEWS SYSTEM</p>
    <div id="headlinescontainer"></div>
    <div id="controlpanel">
    <img src="backbtn.gif" width="50" height="20" />
    <img src="forwardbtn.gif" width="50" height="20" />
    </div>
    </body>
    </html>

    As you’ll certainly recall, the source code that corresponds to the above file composes the presentation layer of the application. It obviously displays, on the web document, all the sections required for including the headlines fetched directly from the server, as well as for showing the corresponding navigational buttons.

    At this moment, I think that the previous file should be familiar to you, right? Based upon this assumption, let’s go one step further and take a quick look at the full source code of this AJAX-based headlines application, this time including the complete set of JavaScript functions that make up the behavioral layer of the program.

    To see how the complete client-side code corresponding to this application looks, I recommend that you click on the link below and keep reading.

    More JavaScript Articles
    More By Alejandro Gervasio


       · In this concluding part of the series, you'll learn how to code a simple XML file...
     

    JAVASCRIPT ARTICLES

    - More on JavaScript Array Objects
    - Methods of the DOM Location Object
    - The DOM Location Object Properties
    - Handling Remote Files with JavaScript Click ...
    - Using Click Interceptions with a Database-Dr...
    - Using JavaScript Click Interceptions in an I...
    - Using Click Interceptions with JavaScript
    - QuickSort in Action
    - Quicksort
    - Using Mod_Security to Protect Your Server
    - Detecting and Countering Server Intrusions
    - Securing Your Web Server
    - Building a Secure Web Server
    - Protecting the Server
    - Book Review: Learning the Yahoo! User Interf...


     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT