JavaScript
  Home arrow JavaScript arrow JavaScript Remote Scripting: Reading Data ...
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 
VeriSign Whitepapers 
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

JavaScript Remote Scripting: Reading Data From the Server
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 21
    2005-09-21

    Table of Contents:
  • JavaScript Remote Scripting: Reading Data From the Server
  • A non-standard approximation: reading server data with AJAX
  • Checking asynchronous http requests: taking a look at the "statusChecker()" function
  • Displaying file contents: defining the "createDataContainer()" and "displayData()" functions
  • Reusing the source code: listing the full script

  • 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
     
    Iron Speed
     
    ADVERTISEMENT

    At the virtual BlackBerry Technical Seminar 2008, you can ask your development questions directly of Research In Motion® (RIM) experts, and take advantage of learning opportunities designed uniquely for BlackBerry solution developers. Register Today!

    JavaScript Remote Scripting: Reading Data From the Server


    (Page 1 of 5 )

    Client-server interaction achieved without involving page reloads has become very popular for Web services. This can be handled in a variety of ways. This article covers several of them, starting with Asynchronous JavaScript and XML (AJAX).

    Introduction

    With the rapid introduction of JavaScript-based http requests into Web programs, one of the most common activities during the development cycle for a client-side application involves writing code to perform some kind of silent interaction between the browser and the server.

    Although it's rather premature to evaluate the real impact of all these backend processes within existing and future applications, the truth is that client-server communication without page reloads has become extremely popular for implementing a great variety of Web services. Whether you're planning to develop an auto-completion system, a simple news rotator or a full-fledged mechanism to pull out database records in the background, JavaScript-based http requests can make the overall development process much faster and more pleasant.

    The thing about silent client-server interaction, though, is that it can be performed through several methods categorized under the generic title of remote scripting. Of course, if you're in touch with modern Web programming, probably the first approximation that comes to your mind is AJAX (Asynchronous JavaScript and XML), which uses native XMLHttpRequest objects -- or an ActiveX Control in the case of Internet Explorer -- for dynamic file requesting.

    However, the list doesn't end there. With very little knowledge about some DOM methods, it's possible to make true http requests on the fly, all without putting a single hand into AJAX technology. As I said right at the beginning of this article, background client-server interaction has turned quickly into a popular feature within Web applications, so it's worth taking a look at some of these approaches for making requests on the fly.

    Over this series of tutorials, I'll be attempting to build some JavaScript applications, in order to illustrate different approaches to pulling out server data, ranging from the already traditional AJAX technique to W3C DOM standard-compliant methods. The end result of this experience will be a set of easy-to-customize JavaScript programs, useful to include in your own applications with only minor hassles.

    Let's get going!

    More JavaScript Articles
    More By Alejandro Gervasio


       · This first tutorial introduces the basics for fetching files from the server through...
       · Your code assumes that AJAX is not possible in a non-ActiveX IE.According to...
       · Hello Kae,I wrote the script by assumming the availability of ActiveX in IE6....
       · I thank you for your really cool article about AJAX. For me it's kinda new and...
       · Hi there. His follow up article should come 2 weeks after this one. Usually, a...
       · Hello,Many thanks for the kind words about the introductory AJAX series. Of...
     

    JAVASCRIPT ARTICLES

    - 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
    - Adding Zoom Controls to Yahoo! Maps
    - Working with Yahoo! Maps
    - Building Image Zooming Controls with the DOM...
    - Working with Multiple Graphics for a Zoom Ap...

    Iron Speed

    Iron Speed





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