JavaScript
  Home arrow JavaScript arrow Principles of Active Client Pages: the Scr...
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 
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

Principles of Active Client Pages: the Script Approach
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-06-12

    Table of Contents:
  • Principles of Active Client Pages: the Script Approach
  • Source Code
  • String Content
  • Principles of the Script Approach

  • 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


    Principles of Active Client Pages: the Script Approach


    (Page 1 of 4 )

    In this part of the series, I give the principles of the Script Approach to Active Client Pages. I am the one who came up with these principles to suit the advantages I mentioned in the previous part of the series. In order for you to understand the Script Approach, I will have to explain the simple example we saw previously. This article is the second part of a three-part series.

    Explanation of the Simple Example

    To have a frameset, you need a normal HTML document. Then, instead of having the BODY element in the document, you have but the frameset tags. The frameset tags can have several frames (tags) within them. Each frame takes an HTML document.

    In our case we have only one frame. Note how the frame and frameset ("100%,*">) have been declared. The source file for our single frame is myChild.htm (see source code on the next page). The name of the frame is myChild.

    The JavaScript for the frameset document has an array and two variables. The array is created in the script of the frameset document. The first element of this array has all the content (HTML elements) of the first page, except the <html> and </html> tags and some small JavaScript. See how the HTML elements forming the contents have been assigned as a string. This is one of the important factors of the Script Approach; the page contents are handled as strings.

    The next variable in the frameset script is pInx. It is initialized to zero. This zero refers to the first element in the array. The array elements are to hold pages in string form. Index zero for the array is for the first page, index 1 is for the second page, index 2 for the third and so on. To display a page, you simply send the string value of the corresponding array element to the frame.

    For this example, the frameset document is our master, which has the store. The store is the array. Generally, the store is a combination of variables, object properties and arrays. As the pages are downloaded, they are stored as long strings in the array.

    Note that our example makes use of only the first and second elements of the array, since we have just two pages. You cannot store data in the frame document, since you always have to be changing its content.

    More JavaScript Articles
    More By Chrysanthus Forcha


     

    JAVASCRIPT ARTICLES

    - Comparing Fields and Customizing Error Messa...
    - Checking Numbers and File Extensions with jQ...
    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in







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