Home arrow JavaScript arrow Page 5 - Questions and Answers on Chrys`s Approach to Active Client Pages
JAVASCRIPT

Questions and Answers on Chrys`s Approach to Active Client Pages


In this eleventh part of a twelve-part series on active client pages (ACP), I give you more factors that gave rise to the Window Phase of Chrys’s Approach. We continue with the questions and answers more or less from where we left off last time.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
September 11, 2009
TABLE OF CONTENTS:
  1. · Questions and Answers on Chrys`s Approach to Active Client Pages
  2. · Can you open a window, which will open another window, which will open another window and so on?
  3. · Can you access Values and Contents in the Parent Window?
  4. · Can I make my remarks now?
  5. · How do you really give a window a name?

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Questions and Answers on Chrys`s Approach to Active Client Pages - How do you really give a window a name?
(Page 5 of 5 )

You can give a window a name as you open the window. This is the syntax for the opened window:

window.open(URL,name,specs,replace)

The second parameter is used for this. You give the name in quotes.

After opening a window, you can still give it a name from the parent window. The following code opens a window and gives it a name:

myWindow = window.open();

myWindow.name = “windowOne”;

windowOne is the name of the window given.

Now, how do you give a name to the master or current window?

It is simple. In the JavaScript of the page, you should have the statement:

window.name = “master”;

where master is the name you have given to the current or master window.

Can you execute a JavaScript function in a different window?

You may not believe this, but the answer is yes. All you need is the reference to the window. In whatever window you are, you begin with the reference to the window; follow this reference with a dot, then the name of the function and its arguments in brackets. For example, assume that you have the following function in a particular window:

function myFn(param1, param2)

{

//statements of the function

}

Also assume that you are in a different window and you have the following variable, which holds the reference to this particular window.

var theRef;

In this different window, you can execute the function as follows:

theRef.myFn(arg1,arg2);

Wow, we have asked many questions and we have received the answers. Taking the definition of ACP into consideration, I think we have asked enough questions. We have got enough foundation to look at a simple example of the Window Phase of Chrys’s Approach. We shall look at this example in the next and last 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 8 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials