A Document Moving Store for Active Client Pages - The page2Script.js Script (Page 4 of 4 )
alert('Second page 1st store value is ' + document.getElementById('S2').rows.cells.innerHTML);
alert('Second page 2st store value is ' + document.getElementById('S2').rows.cells.innerHTML);
var page3Doc = "<html>"
+ "This is the third page."
var pageThree = document.open();
The showStoreValues() function displays the values in the store in the second page. This function is called when the first button of the second page is clicked. It uses two alert statements to display the value of the store. DOM features are used here.
After this function in the script, you have the string, which has the HTML content of the third page. Next in the script, you have the function that produces the third page. This function is called when you click the second button of the second page.
That is it. That is an example of a moving store. In the next part of the series, we shall look at a simple example of the Document Phase of Chrysís Approach. In that example we shall use Ajax.
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.