# Problem with pop up windows

**URL:** <https://forum.kirupa.com/t/problem-with-pop-up-windows/200486>\
**Category:** flash\
**Created:** [September 12, 2006, 4:31pm UTC](https://forum.kirupa.com/t/problem-with-pop-up-windows/200486 "2006-09-12T16:31:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shyheim](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@shyheim](https://forum.kirupa.com/u/shyheim)\
**Post date:** [September 12, 2006, 4:31pm UTC](https://forum.kirupa.com/t/problem-with-pop-up-windows/200486/1 "2006-09-12T16:31:44Z")

</div>

Hello, I have an image gallery with little image buttons. I want this buttons to open the large image in pop up windows but the images have different sizes and when I open a pop up with an image and later I push another button with a different sized image, the pop up window doesn´t change his size. I don´t want to be all the time open and closing windows. This is the code i´m using:

on (release) {  
getURL(  
javascript:openNewWindow(‘[http://www.one.htm](http://www.one.htm),‘thewin25’,‘height=  
413,width=550,top=’+((screen.height/2)-(213))+’,  
left=’+((screen.width/2)-(550))+’,toolbar=no,scrollbars=no’)

in html :

\<script language=“JavaScript”\>

function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); }

\</script\>
