# Javascript Window Properties

**URL:** <https://forum.kirupa.com/t/javascript-window-properties/47348>\
**Category:** web dev\
**Created:** [April 2, 2004, 9:28pm UTC](https://forum.kirupa.com/t/javascript-window-properties/47348 "2004-04-02T21:28:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wyclef](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@wyclef](https://forum.kirupa.com/u/wyclef)\
**Post date:** [April 2, 2004, 9:28pm UTC](https://forum.kirupa.com/t/javascript-window-properties/47348/1 "2004-04-02T21:28:00Z")

</div>

Hello,

Can someone tell me how to include the window properties into this script? Menubar, Toolbar, Resize, Scrollbar, etc.?

```auto

<html>
<head>
<title></title>

<script type="text/javascript" language="JavaScript">

<!--

    window.onload = function() {
     

        var width,height,new_x,new_y;

        // New width/height
        width = 640;
        height = 440;

        // Set the new x/y values for the window
        // This will move the window to the center of the screen
        new_x = ((screen.availWidth / 2)- (width / 2));
        new_y = ((screen.availHeight / 2) - (height / 2))

        // Resize the window and move it to the center of the screen
        window.resizeTo(width,height);
        window.moveTo(new_x,new_y);

}
-->
</script>

</head>

<body>
s
</body>
</html>

```
