AJAX
  Home arrow AJAX arrow An Enhanced Ajax Approach to Active Client Pages
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
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? 
Google.com  
AJAX

An Enhanced Ajax Approach to Active Client Pages
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 7
    2008-10-28


    Table of Contents:
  • An Enhanced Ajax Approach to Active Client Pages
  • The DOM Table
  • The innerHTML Property
  • The HTML OBJECT Element
  • Summing Up

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    An Enhanced Ajax Approach to Active Client Pages
    ( Page 1 of 5 )

    In this final part of a four-part series, I give you my enhancements to the AJAX approach to Active Client Pages. Before I conclude the series, I will introduce two other approaches to you. Keep reading to learn how to help your web pages load more quickly.

    The Store

    Active Client Pages Technology needs a store. With the Ajax approach, the store is in the JavaScript in the HEAD element of the master page. Data is stored in JavaScript variables, JavaScript arrays or JavaScript object properties. These elements would constitute the store. We saw this previously. The pages come and go but data for the different pages can remain in the store in the script of the HEAD element.

    Other Methods of Storing Data

    JavaScript 2D Array

    If your data, including the information you need in advance, is in the form of a table (perhaps from a database), you can store it in a JavaScript 2D Array. You use the for-loop when creating a 2D array. The following code creates a 2D, 6 X 4 array.


    a = new Array(6)

    for (i=0; i < 6; i++)

    {

    a[i] = new Array(4)

    }


    HTML Table with Display Value of None

    If your data, including the information you need in advance, is in the form of a table (from a database, perhaps), you can store it in an HTML Table whose value of the display property is set to "none." Your main HTML element in the master page is the DIV element. This DIV element has the HTML elements for the page and the Ajax script to download text (the page) in advance. When the value of the display property of a table or any HTML element is "none," the table does not occupy any space on the web page.

    We can decide to have the DIV element, with one or more HTML tables, with the value of the display property of each of these tables set to "none." You keep your data in the cells of these tables. In the CSS normal flow, it is good to create these tables just before the DIV element of the master page. To create one of these tables, all you need to do is type the following:

    <table id=“T1” style=“display:none”></table>

    “T1” is the ID of the above table tag. You can use DOM features to add the rows and cells and cell contents. The DOM features you need are given below.



     
     
    >>> More AJAX Articles          >>> More By Chrysanthus Forcha
     

       

    AJAX ARTICLES

    - PHP AJAX Form Validation
    - Completing a User-Defined CSS Website with P...
    - Create a User-Defined CSS Website with PHP
    - Build A Better Twitter Chat Client Than Cham...
    - Using Division Equations to Make Web Forms S...
    - Using Integer Multiplication to Protect Web ...
    - Using Simple Checksums for Web Form Verifica...
    - Protecting Web Forms with AJAX
    - Using Prototip with AJAX
    - Using Prototip
    - Using the google.load() Method with Google`s...
    - How to Handle Ajax Errors
    - Uncompressing Source Files with Google`s AJA...
    - Using the jQuery Framework with Google`s Aja...
    - Using Google`s Ajax Libraries API




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek