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

Open a window as full size

Status
Not open for further replies.
Apr 25, 2002
156
0
0
GB
Hello there

I have a simple problem .... i wish to open a window as full size when i click on a button as below. Currently the window opens in the middle of the form and then i have to maximise it with the click of a mouse.

I have a list of buttons each as below and i wish to open all the relevant links....

button[1] = '<u>A</u>rtroom Explained';
buttonWidth[1] = 150; //This is the button's width, in pixels.
msgstat[1] = function () {
window.status='Artroom'; return true;
}
action[1] = function () {
// Place here you actions for button 1:
window.open(' // End of actions for button 1.
}

regards

Murray
 

in <head> block of the page being opened
function makeBig()
{
window.moveTo(0,0);
window.resizeTo(screen.availWidth,screen.availHeight);
}

call it using
<body onload="makeBig();" >

If you want to control it from the opening page, then use the screen.availWidth,screen.availHeight in the parameters for window.open
 
Hi,
Before calling the window.open method,create a properties object:
Code:
windowprops = "fullscreen=yes,location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes";
window.open('[URL unfurl="true"]http://srv01/artroom%20explained.htm','WindowTitle',windowprops);[/URL]
You can vary the options to suit your needs...


[profile]
 
I have a similar situation (problem) and had already done this "move" and "resize" technique described above. However, taking it one step further, I need the new window to open "maximized" so that the user doesn't have to click the windows maximize button. As a matter of fact, I need the browser button to be "Restore Down". The "move" and "resize" tends to give the illusion that the window is maximized, but there are certain browser characteristics that require the window to actually be maximized to work properly. Without this capability, I'm better off leaving the window something less than full size to force the user to click the maximize button - but I see that as just an extra click that I'd like to eliminate.

Can this be done? I hope someone can show me how to make this happen. Seems like it ought to be doable.
 

If you add "fullscreen" to the list of window properties, that should work... So something like:

Code:
var winHandle = window.open(url, name, 'fullscreen,yourOtherArgsHere');

Hope this helps,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top