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.
The Head element has a JavaScript. The first statement in the script is a declaration of the storeVar2_2 variable. The value "I am 2_2" is assigned to it. This value will be displayed by the Doc1 document. This document, Doc1 (fig 3.1) is produced by the window of the sendPge2_2Str.pl file. This file has the content of the second window at level 2.
The script has the openWin3Doc1() function. There is a button in the BODY element. When this button is clicked, this function is called. This function opens a new window that houses the two documents.
The first statement of this function opens a window. The next statement writes the content to the window. We want two HTML documents in this window. The content sent is automatically the first document. The next document will be produced in this window by this first document. The page3Doc0 argument holds the initial content of the first window, which is the first document.
Let us look at what is in the BODY element. You have some text, followed by a line break element and a button. This is the button we mentioned above. You have a JavaScript in the BODY element.
The first line of this JavaScript is a declaration of the page3Doc0 variable, which will hold the content of the next window. This variable is the argument of the openWin3Doc1() function. Next you have the Ajax code, which downloads the content of the next window in advance. It assigns the content as a value to the page3Doc0 variable.
Level 2
Look at the tree of fig.3.1. Level two has two windows. The file for the window on the left is sendPge2_1Str.pl, while that for the window on the right is sendPge2_2Str.pl. We have discussed the contents of these two files.