Closed Thread Icon

Preserved Topic: Help with windows Pages that link to <a href="https://ozoneasylum.com/backlink?for=17879" title="Pages that link to Preserved Topic: Help with windows" rel="nofollow" >Preserved Topic: Help with windows\

 
Author Thread
AskedRelic
Nervous Wreck (II) Inmate

From:
Insane since: Sep 2000

posted posted 09-30-2000 15:24

I need to know the code to make a new window when the website loads and then close the old window without any messages. Can any one please help me??

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 09-30-2000 18:58

as far as I know, you *can't* close a window.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 10-01-2000 02:49

You can close windows that you open using JS but I don't think you can close the original window without the confirmation


Walking the Earth like Kane

vogonpoet
Maniac (V) Mad Scientist

From: Mi, USA
Insane since: Aug 2000

posted posted 10-01-2000 04:19

why cant you?.. surely if one makes a meta redirect to load a new page, then do an onclick, close? and at the same time open a new window?

I am not a javascript expert, but it sure seems logical?

vogonpoet
Maniac (V) Mad Scientist

From: Mi, USA
Insane since: Aug 2000

posted posted 10-01-2000 04:21

why cant you?.. surely if one makes a meta redirect to load a new page, then do an onclick, close? and at the same time open a new window?

I am not a javascript expert, but it sure seems logical?

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 10-01-2000 04:40

being able to close a window that you didn't cause to open crosses a pretty significant security issue. For that reason I don't think it's possible.

vogonpoet
Maniac (V) Mad Scientist

From: Mi, USA
Insane since: Aug 2000

posted posted 10-01-2000 04:47

ya,, but... if one goes to a url... which then uses a meta tag to refresh the page to a page (same target)that has a onclick (or whatever) link to a new window?..and at the same time a 'close' statement wouldnt that work.. in theory?...

Weadah
Maniac (V) Mad Scientist

From: TipToToe
Insane since: Aug 2000

posted posted 10-01-2000 04:48

Vogon : Not in IE anyways, not without the confirm box. "This window is attmepting to close your other open browser window...Say yay or nay". It makes sense.

Imagine what the popup pirates would do with windows if they could open and then close them at will. Things are bad enough haha.


vogonpoet
Maniac (V) Mad Scientist

From: Mi, USA
Insane since: Aug 2000

posted posted 10-01-2000 05:04

I dont buy that.. it must be possible... it only makes sense that it could be done.. oh well.. when I figure it out I shall post it back here.. <img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">

Weadah
Maniac (V) Mad Scientist

From: TipToToe
Insane since: Aug 2000

posted posted 10-01-2000 07:10

I think you're confusing the document and the window. They are different things. The document (url, page, meta-refresh names etc) are not the window object.

From memory it goes..........
Outer window > Window > Document (your page). The Document can close any window it creates. But created windows can't close thier parent (or the last open browser window?) without confirmation. As DL said, it's for security.

The document object is very limited to what it's allowed to do with system things like windows. Afaik, it has pretty limited powers outside of itself at all. You can get someone's screen res for example, but you can't change it. You can luanch a new window in the dimensions you want, but you can't change the window your in.

[This message has been edited by Weadah (edited 01-10-2000).]

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 10-01-2000 10:30

In Netscape at least, the history file is associated with the open window. If I visitied your site, and you opened a new window and closed my original, I would lose my listing of where I had been and miss that site I was at before deciding to visit your site briefly. Then I would be pissed at you, of course!

You can't close a window that you didn't open. It's not possible. Intentionally. For good reason!

If you simply must have a new window launched, do so, but leave my original intact, please, it's just good manners. I don't want the only window open to be this strangely shaped one with no navigation tools. Why don't you place that artfully shaped rectangle in a frame, so you can have that beautiful shape to play with, but leave folks with their browser the way they like it? My opinion, anyway. (But I hate launched windows! :-)

Your pal, -doc-

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 10-02-2000 20:11

Yeah and closing windows like that in both browsers would kill you back button as well as your history.

Its just an annoyance if people had the ability to close windows. Could they give us the ability to close parent browser windows? sure. But that would just get annoying. I have no problem with the parent window asking first.


Walking the Earth like Kane

mbridge
Paranoid (IV) Mad Scientist

From:
Insane since: Jun 2000

posted posted 10-02-2000 20:56

Can't be done.

Das
Maniac (V) Inmate

From: Houston(ish) Texas
Insane since: Jul 2000

posted posted 10-02-2000 21:17

According to my JS book, NS 2 would allow the main window to be closed.

NS 3 and later will put up a security confirmation dialog if you try to close the main window when it has more than one entry in its history. As previously said, this was done as a security issue, to stop websites from deliberatly trashing your history. If there is only the one entry in the history (the current page), the window.close() works without the dialog (according to the book, anyway).

The book doesn't say anything about IE's response to a window.close() on the main window.

AskedRelic
Nervous Wreck (II) Inmate

From:
Insane since: Sep 2000

posted posted 10-02-2000 21:30

okay, thanks everyone

« BackwardsOnwards »

Show Forum Drop Down Menu