Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get a new target window to open maximized??

Status
Not open for further replies.

TheBigO

Programmer
Feb 4, 2002
16
US
I am opening a new window from an ASP file but it only opens about 1/3 of the computer screen. Is there an HTML or ASP command that I can use to make it automatically open so that the new browser window fits the computer screen?
 
You should use a script to open a new window, like this:

fucntion newWindow() {
w = screen.availWidth;
h = screen.availHeight;
newWin = window.open('somepage.asp','','width=' + w + ',height=' + h);
}

Or use this script to resize the page after it is opened:

function fullWindow() {
if (window.screen) {
w = screen.availWidth;
h = screen.availHeight;
window.moveTo(0, 0);
window.resizeTo(w, h);
}
}

Activate it on onLoad event:
<body onLoad=&quot;fullWindow()&quot;>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top