Home arrow JavaScript arrow Page 4 - Active Client Pages: More Questions and Answers on Chrys`s Approach
JAVASCRIPT

Active Client Pages: More Questions and Answers on Chrys`s Approach


This is the third part of my series, "Active Client Pages: Chrys’s Approach." We continue to learn the roots that give rise to my approach to Active Client Pages. We will also answer more questions about the technique and its capabilities.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
July 17, 2009
TABLE OF CONTENTS:
  1. · Active Client Pages: More Questions and Answers on Chrys`s Approach
  2. · Can any document use Ajax?
  3. · Can you create your own Back and Forward buttons?
  4. · The DOM go() Method

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Active Client Pages: More Questions and Answers on Chrys`s Approach - The DOM go() Method
(Page 4 of 4 )

Definition and Usage

The go() method loads a specific page in the history list.

Syntax

history.go(number|URL)

If you want to go forward, the number should be positive, e.g. 2. If you want to go backwards, the number should be negative, e.g. –2.

Example

The following example loads the previous page in the history list:

 

<html>

<head>

<script type="text/javascript">

function goBack()

{

window.history.go(-1)

}

</script>

</head>

<body><input type="button" value="Back" onclick="goBack()" /></body>

</html>

What is a store in ACP?

In ACP the first page is downloaded and displayed in the normal way when you type the address in the browser and click Go. The data for any subsequent page in the session is downloaded in advance and kept in the master page. Where this information is kept in the master page is called a store. The store consists of JavaScript variables and/or JavaScript arrays and/or JavaScript object properties. The pages in the session -- except for the first -- are developed at the client browser with information from the store. The Document Phase of Chrys’s Approach does not follow this description strictly.

How can we store data in the Master Page of the document phase of Chrys’s Approach?

As we have seen, script in the loaded document cannot access information in the previous document. It cannot access JavaScript variables, JavaScript arrays or JavaScript object properties in the previous page. It cannot access the content of HTML elements in the previous page. So how can we have data stored in the master page and have them retrieve from a loaded page?

The solution may lie in the use of cookies. The trouble with cookies is that their operation is not standardized. Maybe someone will one day come up with consistency in using cookies as a store; I will not address that. So if we use cookies now, we may have errors with our financial calculations. We have to resort to a moving store. What do I mean by a moving store? Rendezvous in the next part of the series.


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.

blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



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