Home arrow HTML arrow Page 4 - Active Client Pages: Completing the Code for a Browser Example

Active Client Pages: Completing the Code for a Browser Example

The aim of this five-part series is to show to what extent a major browser responds to ACP. ACP is a new technology. In order to understand how a browser responds, we need an example to use to test the browser. We need to understand the example first. In this third part of the series I complete the explanation of the example.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
September 15, 2009
  1. · Active Client Pages: Completing the Code for a Browser Example
  2. · The sendPge2_2Str.pl File
  3. · Level 3
  4. · The window on the right at Level 3

print this article

Active Client Pages: Completing the Code for a Browser Example - The window on the right at Level 3
(Page 4 of 4 )

This window has not been indicated in fig 3.1. However it exists. It is the window that contains the Doc1 and Doc2 documents. When you create the window, you create Doc1 automatically. Doc1 creates Doc2. In this section, we look at Doc0 and Doc1.

The window here is different from the other windows we have seen in the sense that it houses two documents. Each of the other windows in the session houses only one document, and no distinction has been made between the window and its document. Here there are two documents, and you will see some distinctions.


The content of Doc0 resides in the file, sendPge3Doc0Str.pl in the server. This is the file:

$returnStr = qq{



<script type="text/javascript">

function loadDoc1()


var p3D1 = document.open();







This is page 3 Doc 0<br />

<button type="button" onclick="loadDoc1()">load Doc 1</button>

<script type="text/javascript">

//content of page 3 Doc1

var page3Doc1 = "";


//Ajax code to download the next document





print $returnStr;

This is a Perl file, with two Perl statements as in the other cases. The content of the quote operator is an HTML page. This is the initial content of the window. Any window has at least one document. So this initial window content is a document.

Let is look at the HTML content. There is a Head element. This element has JavaScript, which has one function, called loadDoc1(). There is a button in the BODY element. When this button is clicked, this function is called. The function loads the second document.

The first statement in the function opens an output stream. The next statement writes content into the output stream. The third statement closes the output stream, and by so doing, creates a new document. Note that the method of creating a new document is different from the one of creating a new window.

Let us look at what is in the BODY element. You have some text, a line break element and the button we have just talked about. Next you have a JavaScript. The first statement in the script is a declaration of the page3Doc1 variable that will hold the content of the next document (Doc1). After this statement, you have the Ajax code that downloads the content of the next document in advance. This next document is only loaded when you click the above button.

It is time to take a break. In the next part of the series, we shall quickly look at the remaining code, and then we look at the features in the example that we shall use to assess the browsers.

DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials