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 Quote Link to comment 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') Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.