File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes open new browser already maximized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "open new browser already maximized" Watch "open new browser already maximized" New topic
Author

open new browser already maximized

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

When I open a new browser like this
<a href="something.html" target="outside">
is there a way to force it to open maximized?


SCJP
Visit my download page
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
In JavaScript you can use the open method of the window object to open a new window very big, but you cannot programmatically maximize a window this way.
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
If the page you are opening up is a page you are creating, you can have an onLoad event that maximizes the window. So you are not doing it in the page that opened the window, but in the page that gets opened.
Bill
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
What code would you put in the event handler to actually do the maximizing?
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
Well it is actually a work around to do it. There is no mazimize() function. But you can resize it to the maximum dimensions of your screen. The code would look like this:
***This was taken from www.javascript.com

Bill
[This message has been edited by bill bozeman (edited February 22, 2001).]
Linsey
Greenhorn

Joined: Dec 01, 2001
Posts: 1

I tried this script, but it doesnt fully maximize the window, it only resizes it to the full available size.

function maximizeWin() {
if (window.screen) {
var aw = screen.availWidth;
var ah = screen.availHeight;
window.moveTo(0, 0);
window.resizeTo(aw, ah);
}
}
// -->
</SCRIPT>
<FORM><INPUT TYPE="button" VALUE="Maximize" onClick="maximizeWin()"></FORM>

Does anyone know a script, or a place to get one, that actually maximizes?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I have a script on my web page that will allow you to do whatever you want with the pop up
go here
http://www.a1ien51.8k.com/scripts/popupwingenV2.htm
any other questions just email me, or post here
 
Consider Paul's rocket mass heater.
 
subject: open new browser already maximized