A Simple Document Phase Example of Active Client Pages
In this fifth part of a twelve-part series on Active Client Pages, we look at a simple example illustrating the Document Phase of Chrys’s Approach. You need good knowledge in HTML and JavaScript to understand this part of the series.
A Simple Document Phase Example of Active Client Pages - The Master Page Code (Page 2 of 4 )
The Skeleton
<html>
<head>
</head>
<body>
< -- The HTML elements -- >
<script type= "text/JavaScript">
< -- The Store -- >
< -- Ajax Code -- >
< -- Function to develop and load the second page -- >
</script>
</body>
</html>
The Code Segments
You have two main code segments: the HTML elements segment and the JavaScript. The JavaScript has three sub code segments.
The HTML Elements Segment
This is the code for this segment:
This is the First page.<br />
<button type = "button" onclick="loadSecondPage()">Load Second Page</button>
You have a line of text, followed by the line break element. Then you have the button. When this button is clicked, the loadSecondPage() function will be called. This function is in the script below the HTML Elements segment. It will develop and load the second page.