Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a popup

Status
Not open for further replies.

philips

Programmer
Oct 5, 2000
7
0
0
GB
I have created a popup window
using the window.open statement that opens with no toolbar
This creation is done when a window is opened

I then want to close the original window without warning
the user about closing the window

How do I prevent the user being asked if they want to
close down the window or not
 
my computer used to ask me if i wanted to close the window. but for some reason, it stopped. i doubt that it will prompt everyone, so dont be too worried about that. anyway, just a tip of advice that i always use.
use self.close() instead of window.close(). that way, javascript wont ever get confused if you name another window, window. its not necessary at all, just something i use for convenience.

- Rusty
 
when your create the NEW window define the window like this:

myWindow=window.open(...);

Now when your want to close the window use:

myWindow.Close();

You should not be prompted since you have the rights needed to close it since you created it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top