The Artima Developer Community
Sponsored Link

.NET Buzz Forum
The Uncanny Disappearing Window

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Merill Fernando

Posts: 589
Nickname: merill
Registered: Sep, 2003

Merill Fernando is an MCSD in .NET and a Microsoft Certfied Trainer
The Uncanny Disappearing Window Posted: Dec 15, 2003 7:09 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Merill Fernando.
Original Post: The Uncanny Disappearing Window
Feed Title: Merill Fernando's Blog
Feed URL: http://www.merill.net/blogxbrowsing.asmx/GetRss?
Feed Description: Merill is a Software Architect at Business Technology Alliance. Merilll is an MCSD in .NET and a Microsoft Certfied Trainer. In this feed he will be regularly posting on the challenges faced when migrating from a Microsoft DNA architecture to Microsoft .NET
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Merill Fernando
Latest Posts From Merill Fernando's Blog

Advertisement

How do you programmatically close a browser window when you didn't open it? Of course, everybody knows you can't. If they don't know that, they're novice developers and some seasoned veteran will set them straight... gently or otherwise.

Well, this week one of my clients -- whose intranet app opens in a specially formatted window -- told me they didn't want two windows just to start one application. I had very little success removing the toolbars from an existing window, and my vast web development experience told me that I had no other option. Rather, I didn't until a suggestion from a fellow member of the LaTech JavaScript list altered my perspective and resulted in the script I'm about to show you.

All you need to start the magic is to assign a window to the opener property of the current window. If this attribute is not set, the browser will realize that the current window is not open to your manipulation and nothing will happen.

      <SCRIPT LANGUAGE="JavaScript">
            window.opener = top;
      </SCRIPT>

[Read more]

Read: The Uncanny Disappearing Window

Topic: .NET Online Seminars Previous Topic   Next Topic Topic: Jealous wife 'cut off sleeping husband's penis' - www.smh.com.au

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use