cleary1981 Posted July 23, 2008 Share Posted July 23, 2008 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 More sharing options...
paul2463 Posted July 23, 2008 Share Posted July 23, 2008 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') Link to comment https://forums.phpfreaks.com/topic/116185-open-new-window-maximised/#findComment-597452 Share on other sites More sharing options...
cleary1981 Posted July 23, 2008 Author Share Posted July 23, 2008 i will still have the problem that the new window shows from the middle of the screen and half is out of view. would probably need to set position to 0,0 aswell Link to comment https://forums.phpfreaks.com/topic/116185-open-new-window-maximised/#findComment-597455 Share on other sites More sharing options...
paul2463 Posted July 23, 2008 Share Posted July 23, 2008 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 Link to comment https://forums.phpfreaks.com/topic/116185-open-new-window-maximised/#findComment-597461 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.