Re: How do I get the resolution of my screen?
| From: | MailingLists | Date: | Tue, 11 Sep 2001 20:03:18 +0000 |
| Subject: | Re: How do I get the resolution of my screen? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66957@lists.php.net to get a copy of this message | ||
nope, it don't... but you could easily do this in JavaScript:
function OpenCenter() {
// we're going to center the popup screen
nLeft = ( screen.width - 350 ) / 2 ;
nTop = ( screen.height - 300 ) / 2;
// open the window
var newWind = window.open( "someurl.html", "shipit", "width=450,height=300,titlebar=no,addressbar=0,resizable=yes,scrollbars=yes,screenX=" + nLeft + ",screenY=" + nTop + ",left=" + nLeft + ",top=" + nTop );
if( newWind.opener == null ) {
newWind.opener = window;
}
}
At 03:46 PM 9/11/2001 -0400, Don wrote:
Hi, I have a link that opens a small window. I'd like to center it in the screen regardless of the resolution in use. Does PHP have a way of returning the width/height of the current screen in pixels? Thanks, Don