Active Client Pages: Simple Document Phase Example Continued
In this sixth part of a twelve-part series on Active Client Pages (ACP), we complete the simple example that illustrates the Document phase of Chrys’s Approach. You need good knowledge of HTML, JavaScript and Perl to understand this part of the series.
Active Client Pages: Simple Document Phase Example Continued - The Content of the Third Page (Page 4 of 4 )
We shall now look at the content of the third page. This page is produced as a string at the server, by Perl. This is the content of the Perl file that produces the string. It is the file that is called by Ajax.
$returnStr = qq{
<html>
<head>
</head>
<body>
This is the third page. <br />
First Name: <span id="S31"></span><br />
Last Name: <span id="S32"></span><br />
</body>
</html>
};
print $returnStr;
This is also how the string for the second page was produced. The content of the string consists of the HTML elements. You can see the tags for the SPAN elements of the third page. These two SPAN elements will each hold the first name and the last name.
What we have done so far
In the first part of the series, we had general ideas about Chrys’s Approach to Active Client Pages. In that first part we learned that there are two phases to Chrys’s Approach: the Document phase and the Window phase. All along we have been dealing with the Document phase. In parts two and three of the series, we learned the roots that gave rise to the Document phase. In parts four and five we saw a simple example.
We are slowly finishing off the Document phase. I have to talk about how you can handle images in the Document phase next. After that I will give you a summary of the Document Phase.
I have one zip file containing all of the files for the simple example. You can download the zip file from the following link:
For the Document phase of Chrys’s Approach to ACP we shall see how an image gallery benefits from it. That will be for the next part of the series. After that, we shall look at the summary of the Document phase of Chrys’s Approach to ACP. Next, we shall start the Window phase, and then we shall conclude. I will write many independent articles based on ACP.
For now, rendezvous in the next section.
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.