localendar Forums Homepage

Print at Oct 12, 2025, 5:20:48 AM View all posts in this thread on one page
Posted by SmokinBill at Oct 12, 2012, 4:00:00 PM
Pop-Up to center in browser?
I have searched for this topic but have found nothing. I would like to know if there is a way to get the pop-up to center in the middle of the browser window? On large monitors, the pop-up defaults to the upper left corner of the monitor, even if the browser is open on the right side of the screen. It's disjointed and unintuitive to have to go "looking" for the pop-up.

Posted by support at Oct 15, 2012, 11:26:21 PM
Re: Pop-Up to center in browser?
The pop-up location is actually a browser-specific behavior, but you can get close to what you want.

Under Options->Events in "Common Event Information" add this code:
<script>
$(document).ready(function() {
var w = window.outerWidth;
var h = window.outerHeight;
window.resizeTo(w,h)
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
window.moveTo(winl,wint)
});
</script>


Side note: The behavior is a little unpredictable with 2 or more monitors in play.
----------------------------------------
Marc Higgins
Support Associate, localendar.com
Follow us on Twitter! http://www.twitter.com/localendar_news


Help! | Cobranding | Legal | Privacy Policy | About localendar.com | Contact Us