Forum Moderators: open

Message Too Old, No Replies

maximized window with javascript?

can window.open() create a maximized window

         

crow976

3:04 pm on Jul 18, 2003 (gmt 0)

10+ Year Member



I'm using javascript's window.open to open a link in a new window... and i'd like that window to be maximized. I tried the fullscreen=yes option, which really doesn't do what I want (but now I can say I know how to make those annoying pr0n pop-ups..) So is there any solution, or all i can do is supply big enough width/height values..?

gph

8:18 pm on Jul 18, 2003 (gmt 0)

10+ Year Member



AFAIK there's nothing to maximize a window. The best you can do is use (I'm guessing at this syntax) screen.availWidth and screen.availHeight

But now where do you position the window? Where are the users toolbars? None of this is available to js. I would suggest rethinking what you're doing rather than opening the window over top of or underneath toolbars etc.

Just my personal experience. I have the windows task bar on top of the screen. I've yet to see a window like this that does'nt open underneath it. The windows task bar is just the tip of the iceberg. People use toolbars of all types all over the screen.

ikbenhet1

8:22 pm on Jul 18, 2003 (gmt 0)

10+ Year Member



Here an example for maximized window:
[webmasterworld.com...]

Here is full-screen for netscape:
<script language="JavaScript"><!--
window.open('page.html','newwin','fullscreen');
//--></script>

for ie:

<script language="JavaScript"><!--
w=800
h=600
if (window.screen) {
w = window.screen.availWidth;
h = window.screen.availHeight;
}
window.open('page.html','newwin','width='+w+',height='+h+',top=0,left=0');
//--></script>

gph

8:38 pm on Jul 18, 2003 (gmt 0)

10+ Year Member



... and i'd like that window to be maximized

Here an example for maximized window:

ikbenhet1 just so this is clear to crow976. That's not a maximized window. It's a window sized and positioned to simulate it.

tedster

9:25 pm on Jul 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here's what I'c like to see clarified. crow976 already tried the only way there is to open a fully maximized window -- adding fullscreen=yes to the features string. That code is IE only, but it does work in IE.

Crow, you said this wasn't the effect you're looking for. In what way? Were you not using IE? Or even in IE, is this not what you mean by "maximized"?

crow976

8:17 pm on Jul 22, 2003 (gmt 0)

10+ Year Member



I just had some problems with a tree column toolbar at the top of my page. The middle column had its content centered, but when I was resizing the browser window, it wasn't recentering correctly for some reason. I don't think I changed any of the code at all but now the issue is gone. That page is showing some financial data of the company, takes a lot of place so I know everyone is maximizing the window... so everybody would have seen the text wasn't centered. But now it works so all is fine.

Tedster: By maximized window I meant taking the whole workspace.... just like when you click on that icon next to to the X on the top right of every window... the fullscreen=yes option is just like pressing F11 in IE... it masks the windows taskbar...and doesn't have the ie toolbar... so its really as fullscreen as you can get! better be quick on that alt-f4 combo if the page showing is not the clever ;)

but thanks for you help guys, but I worked my way around.

Reality is that which, when you stop believing in it, doesn't go away

crow976

8:19 pm on Jul 22, 2003 (gmt 0)

10+ Year Member



oh and, see what happens when you type too fast?

heh.