# Error in my window.open ? Please help

**URL:** <https://forum.kirupa.com/t/error-in-my-window-open-please-help/64831>\
**Category:** Uncategorized\
**Created:** [September 20, 2004, 4:38pm UTC](https://forum.kirupa.com/t/error-in-my-window-open-please-help/64831 "2004-09-20T16:38:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mindfriction](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mindfriction/32/172_2.png) [@mindfriction](https://forum.kirupa.com/u/mindfriction)\
**Post date:** [September 20, 2004, 4:38pm UTC](https://forum.kirupa.com/t/error-in-my-window-open-please-help/64831/1 "2004-09-20T16:38:32Z")

</div>

Hi guys,

Ive been using the script for the centred pop-up window from the kirupa tutorial and it works fine in Firefox, but IE is picking up a Javascript error, and hence not “popping open” the window. I can’t seem to see the problem for the life of me. Could someone help me spot the error?

Here’s a snippet of my function which calls the JS

```auto

Movieclip.prototype.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) { 
	//address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable
	 getURL("javascript: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+"))+'"+"');void(0);");

}

```

Thanks in advance!

---

<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:** [September 22, 2004, 9:54am UTC](https://forum.kirupa.com/t/error-in-my-window-open-please-help/64831/2 "2004-09-22T09:54:28Z")

</div>

don’t know if it’ll help but you might wanna stick the window.open line into a javascript function and then call it from your code, passing all appropriate parameters as you go…not sure it’ll help but it might
