javascript:close.window()

They have: 330 posts

Joined: Apr 2000

I am looking for the script that will close a popup window without prompting "Close Window?". Any help would be appreciated.

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

such a script does not exist. You cannot close the main browser-window without the prompt.

____
Oops, looks like I have to adjust my reading-capabilities Smiling

[Edited by Jack Michaelson on 08-24-2000 at 03:00 AM]

Shakespeare: onclick || !(onclick)

They have: 330 posts

Joined: Apr 2000

How about a popup window?

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi artsapimp,

window.close();
self.close();
windowName.close(); where windowName is the name of the popUP

Take your pick, dependent upon your needs.
Vinny

Where the world once stood
the blades of grass cut me still

They have: 330 posts

Joined: Apr 2000

so a popup window named "popup" that you want to automatically close once called upon would be written as what?

< script language = j@vascript >
< popup.cl0se() >

Like that?

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

something like that, yah.
popup.close() doesn't need the <>'s

They have: 429 posts

Joined: Jul 2000

If you want to call it by a link, the HTML would be:

Link text

They have: 268 posts

Joined: May 1999

You can look at my site at http://www.shoutingrock.org/troop214 and look at the photos. If you click on the composite photo you will open a new window. There is a close button on it that you can view source for.

My goal in life is found in Phillipians 4:8-9
shoutingrock.org/troop214

They have: 330 posts

Joined: Apr 2000

I'm still having some problems. I'm sure it's because of frames because it's working without them. When I open the page popup_close.htm which is the bottom frame of the page and I click the close button it works. If I open page.htm which has popup_close.htm as the bottom frame and top.htm as the top of the frame. When I click the button it does nothing. Does anyone know why that would be?

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi artsapimp,

Guess I'm tuckered out from 3 hours sleep and two 5 hour drives in a 20-hour period. Are you trying to close a frame with window.close()? -- you can't; at least as far as I know.
If you have 2 frames top & bottom, and pop a window from frame bottom, you can close the popUp from bottom or the popUp with the code supplied. If you want to close popUp from top, I'm not sure -- but, try:

parent.bottom.windowname.close();

If nothing I said makes sense (and I'm not sure if it does), post the url.

Vinny

Where the world once stood
the blades of grass cut me still

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.