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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

maximize windows - ? onload

Status
Not open for further replies.

LEICJDN1

Technical User
Nov 27, 2002
201
GB
Hi,

I have a JS link to open a full size pop up using this function:


function fullWindow(url) {
var str = "left=0,screenX=0,top=0,screenY=0,status=yes, menubar=yes, location=yes, toolbar=yes, scrollbars=yes, resizable=yes, ";
if (window.screen) {
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
str += ",height=" + ah;
str += ",innerHeight=" + ah;
str += ",width=" + aw;
str += ",innerWidth=" + aw;
}
win=window.open(url, "w", str);
}


But it does not maximize the window, so sometimes the links which are at the bottom are only visible once you maximize.

How can I alter the function to ensure window is mazimized, or how can I force the opened window to maximize?

For an example go here:


Scroll to the bottom and click on the link 'causes of a sinus tachycardia'

Thanks.
 
Here's how that site did it...

function fullWindow(url) {
var str = "left=0,screenX=0,top=0,screenY=0,status=yes, menubar=yes, location=yes, toolbar=yes, scrollbars=yes, resizable=yes, ";
if (window.screen) {
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
str += ",height=" + ah;
str += ",innerHeight=" + ah;
str += ",width=" + aw;
str += ",innerWidth=" + aw;
}
win=window.open(url, "w", str);
}

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
Umm?

Am I missing something here?

That is the function I am calling and it does open a full size pop up window.

However the window is not maximized, and in order to see the bottom of the window you have to maximize it.

Is there a way to automatically force it to maximize and reveal the bottom of the window?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top