# Why won't my window lock: Javascript?

**URL:** https://forum.kirupa.com/t/why-wont-my-window-lock-javascript/279257
**Category:** web dev
**Created:** [January 12, 2009, 12:40pm UTC](https://forum.kirupa.com/t/why-wont-my-window-lock-javascript/279257 "2009-01-12T12:40:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lilleypants](https://avatars.discourse-cdn.com/v4/letter/l/f17d59/32.png) [@lilleypants](https://forum.kirupa.com/u/lilleypants)
#### Post date: [January 12, 2009, 12:40pm UTC](https://forum.kirupa.com/t/why-wont-my-window-lock-javascript/279257/1 "2009-01-12T12:40:09Z")

</div>

This is my code for opening a new window as a certain size:

```auto
function OpenPage(theURL){
	var width = screen.width
	var height = screen.height
	if (width <= 900)
	{
	window.open(theURL, '', 'fullscreen=yes, scrollbars=no, resizable=no');
	}
	else
	{
	window.open(theURL,'','width=970,height=584,status=no,menubar=no,scrollbars=no,resizable=no')
	}
}
</SCRIPT>

```

It opens the window fine and etc BUT for some reason I can still resize it even though I put the code resizable = no. Can anyone see why?

Thanks for any help!
