Home arrow JavaScript arrow 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
(Page 1 of 5 )

How do I close a window?

You close a window using the window close() method. Let us look at it.

HTML DOM close() Method

Definition and Usage

The close() method is used to close the current window.

Syntax

window.close()

Example

The following example closes the new window:

<html>

<head>

<script type="text/javascript">

function closeWin()

{

myWindow.close()

}

</script>

</head>

<body><script type="text/javascript">

myWindow=window.open('','','width=200,height=100')

myWindow.document.write("This is 'myWindow'")

</script>

<input type="button" value="Close 'myWindow'" onclick="closeWin()" />

</body>

</html>

From my experience, even though the specification says that the close() method is used for the current window, if you are at a window, and you have a reference to some other window, you can use the reference to close the window as follows:

windowRef.close();


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- 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
- Dynamic jQuery Styling

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 11 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials