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

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
TABLE OF CONTENTS:
  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
SEARCH DEVARTICLES

Active Client Pages: Completing the Code for a Browser Example - Level 3
(Page 3 of 4 )

Look at level three in fig. 3.1. There is one window and two documents. The opener (parent) of the window is different from the opener (parent) of the documents. The documents are in one window (which has not been indicated in the diagram) and this window’s opener is different from that of the indicated window at level 3.

The window on the left at Level 3

Here we talk about the window indicated on the left of level 3 in fig 3.1. The name of the file for this window is sendWinPge3Str.pl. This is the content of the file:

$returnStr = qq{

<html>

<head>

<script type="text/javascript">

function precedeOrReturn(name)

{

if (window.name == name)

{

return window.self;

}

else

{

parentWin = window.opener;

return parentWin.precedeOrReturn(name);

}

}


function showValueInMaster()

{

theRef = precedeOrReturn("master");

alert(theRef.storeVarMaster);

}

</script>

</head>

<body>

This is page 3 win<br />

<button type="button" onclick="showValueInMaster()">Show the Value in Master Page</button>

</body>

</html>

};


print $returnStr;

It is a Perl file similar to the others. The HEAD element has a JavaScript, which has two functions. The first function is the Backward Propagation Code. I have explained how this function operates. The second one is called showValueInMaster(). There is a button in the BODY element of this page. When that button is clicked, this function is called. The aim of the function is to display the value of the storeVarMaster variable from the master page.

There are two statements in the showValueInMaster(). The first one calls the Backward Propagation Code, precedeOrReturn(), passing the name of the first page as argument. The name of the first page is “master.” This call returns a reference to the master page. That reference is used to display the value of the variable from the master page.

Let us look at what is in the BODY element. You have some text, a line break element and a button. When this button is clicked, the showValueInMaster() function is called to display the value of the variable from the master page. This window does not produce any other window, so it does not have the Ajax code. That is it for the left window at level 3.


blog comments powered by Disqus
HTML ARTICLES

- 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 
Support 

Developer Shed Affiliates

 




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