Jump to content

open new window maximised


cleary1981

Recommended Posts

I would have thought this would have been a relatively simple task but from searching the web I can't find any simple answer. Can anyone advise?

 

just to clarify i have the follwing line

 

<input type="button" value="Design Mode" onClick = "window.open('designmode.php', '', 'chrome=yes, resizable=yes')">

 

I want this new window to appear so the user does not have to make any adjustments

 

Link to comment
https://forums.phpfreaks.com/topic/116185-open-new-window-maximised/
Share on other sites

thye only way you can do that is to stipulate the height and width of the window, work out the minimum size the window has to be ot show all the information then use those sizes when you create the window

onClick = "window.open('designmode.php', '', 'chrome=yes, resizable=yes,width=350,height=250')

 

I used this in one of my sites and the pop up window opened in the middle of the page

 

function PopupMe(num){
myleft=(screen.width)?(screen.width-800)/2:100;
mytop=(screen.height)?(screen.height-600)/2:100;
settings='top=' + mytop + ',left=' + myleft + ',width=500,height=400,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=no,fullscreen=no, titlebar=no'
var address = "designmode.php"; //put this in for you
popupwin=window.open(address,'', settings);
popupwin.focus();
}

 

then call the function onClick

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.