Forum Moderators: open

Message Too Old, No Replies

Can window.open be set to open in the existing window?

Trying to resize existing window, remove toolbars, etc.

         

HughMungus

11:13 pm on Feb 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know I can remove toolbars in a new window using window.open. Is there any way to remove the toolbars in an existing window? How about kludging it by doing window.open but in the existing window? I'd do the window.open/onblur close combo but I don't like the warning dialogue box ("another program is trying to close this window").

Bernard Marx

12:45 am on Feb 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The short answer is "No".
I'm not sure there is a long answer.

HughMungus

12:59 am on Feb 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



God that's so frustrating. I wonder why they don't have this feature.

Bernard Marx

1:22 am on Feb 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Because it would be very, very, very irritating.

HughMungus

1:24 am on Feb 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why? My situation is that I have a bunch of links TO my website that are .mp3 links. I want to have those start opening up in a player window, instead (without having to change the links). I have every step down down but can't get the window to resize without opening a new window. Frustrating.

Bernard Marx

8:30 am on Feb 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why is it irritating? Because nobody wants a website to change the appearance of their browser - something that they have chosen. This is especially irritating when browsing with multiple windows open.

Changing the size of the window is equally irritating, but it's still possible (although it can be blocked these days). If you reckon it fits a sensible purpose try that.

Relevant window methods:

moveTo(left,top)
resizeTo(width,height)

rocknbil

6:11 pm on Feb 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I wonder why they don't have this feature.

The annoyance would be the symptom, browsers do not do this "by design." Think about it: if you remove toolbars from the main window, where can they go after they leave your site? Worse yet, at next startup - NO TOOLBARS!

Example: I have one customer that calls me up every three or four months because he claims he can't get to his site. When I investigate, his ADDRESS bar has been hidden and he's actually entering his address into some search field on a search engine which doesn't have his site indexed.

My **theory** is that this guy frequents porn sites which are ruthless in setting cookies, feeding you spyware, and opeing a million windows with no possibility of escape. I'm thinking he accepted something somewhere that hid the address bar on his main window.

But somehow, he perceives his problems are related to something being wrong with his site. :-)

HughMungus

6:49 pm on Feb 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Like I said: irritating because you can resize a window one way but not the other. There *are* some valid uses for resizing windows (including my application which is an embedded audio player).

HughMungus

6:50 pm on Feb 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Right. Like I said, this is for a popup media player window, not just any old window. Thanks anyway!