# Why isn't this working?

**URL:** <https://forum.kirupa.com/t/why-isnt-this-working/191941>\
**Category:** Uncategorized\
**Created:** [June 24, 2006, 4:27am UTC](https://forum.kirupa.com/t/why-isnt-this-working/191941 "2006-06-24T04:27:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![samboy](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@samboy](https://forum.kirupa.com/u/samboy)\
**Post date:** [June 24, 2006, 4:27am UTC](https://forum.kirupa.com/t/why-isnt-this-working/191941/1 "2006-06-24T04:27:56Z")

</div>

hello there,

can someone have a look at this code for a centered pop-up window? why isn’t it working?

```
  **Code:** on (release) { 
Movieclip.prototype.openWin2 = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) { 
   getURL("javascript:var myWin2; if(!myWin2 || myWin2.closed) {myWin2 = window.open('"+url+"', '"+winName+"', '"+"width="+w+", height="+h+", toolbar="+toolbar+", location="+location+", directories="+directories+", status="+status+", menubar="+menubar+", scrollbars="+scrollbars+", resizable="+resizable+", top='+((screen.height/2)-("+h/2+"))+', left='+((screen.width/2)-("+w/2+"))+'"+"')} else{myWin2.focus();};void(0);"); 
}; 

address = "futura continue.html"; 
winName = "window2"; 
width = 624; 
height = 441; 
toolbar = 0; 
location = 0; 
directories = 0; 
status = 0; 
menubar = 0; 
scrollbars = 0; 
resizable = 0; 
openWin2(address, winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable); 

```

}

i put the code in one line and still doesn’t work or maybe i didn’t do it properly

cheers
