# Javascript Window Properties

**URL:** <https://forum.kirupa.com/t/javascript-window-properties/106165>\
**Category:** Uncategorized\
**Created:** [April 2, 2004, 9:28pm UTC](https://forum.kirupa.com/t/javascript-window-properties/106165 "2004-04-02T21:28:00Z")\
**Posts on this page:** 2\
**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/106165/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>

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 6, 2004, 6:49pm UTC](https://forum.kirupa.com/t/javascript-window-properties/106165/2 "2004-04-06T18:49:32Z")

</div>

is there anyway to do this cross-browser???
