2 ms·
Ah, quite right, sorry... <script type='text/javascript'> function windowpop(url, width, height) { var leftPosition, topPosition; //Allow for b
by JohnTHaller 9y ago
Ah, quite right, sorry...
<script type='text/javascript'>
function windowpop(url, width, height) {
var leftPosition, topPosition;
//Allow for borders.
leftPosition = (window.screen.width / 2) - ((width / 2) + 10);
//Allow for title and status bars.
topPosition = (window.screen.height / 2) - ((height / 2) + 50);
//Open the window.
window.open(url+document.URL, "Window2", "status=no,height=" + height + ",width=" + width + ",resizable=yes,left=" + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY=" + topPosition + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no");
}</script>
- StavrosK 9y agoThank you, unfortunately HN eats that. Here it is, better formatted: https://www.pastery.net/fwytsv/ https://www.pastery.net/fwytsv/
- badosu 9y agoYou can post content in verbatim by indenting it by 2 or more spaces (https://news.ycombinator.com/formatdoc https://news.ycombinator.com/formatdoc)
- JohnTHaller 9y agoThanks, updated.