Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

open new browser already maximized

 
Randall Twede
Ranch Hand
Posts: 4363
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I open a new browser like this
<a href="something.html" target="outside">
is there a way to force it to open maximized?
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What code would you put in the event handler to actually do the maximizing?
 
bill bozeman
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic