# New window + javascript paths

**URL:** <https://forum.kirupa.com/t/new-window-javascript-paths/247497>\
**Category:** flash\
**Created:** [December 24, 2007, 6:29pm UTC](https://forum.kirupa.com/t/new-window-javascript-paths/247497 "2007-12-24T18:29:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gnaws](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@Gnaws](https://forum.kirupa.com/u/Gnaws)\
**Post date:** [December 24, 2007, 6:29pm UTC](https://forum.kirupa.com/t/new-window-javascript-paths/247497/1 "2007-12-24T18:29:42Z")

</div>

I have this javascript which opens new, custom windows from Flash. I use this because I have about 12+ windows all with different sizes, that I’d like to launch:

```auto
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
// End -->
</script>

```

it works great if I have my SWF at the same level as my content. But I’d like to keep my content in its own folder.

But when I try this in Flash:

```auto
on (release) {
    getURL("javascript:NewWindow(\"content\pigs.html\",\"skittles\",\"540\",\"440\",\"no\")");
}

```

I get this message:

![](http://img405.imageshack.us/img405/7141/notfoundwd1.jpg) ![](http://img235.imageshack.us/img235/82/notfoundzm9.jpg)

So I figured, “no problem, I’ll just fix the html”

It looked like this:

![](http://forum.kirupa.com/uploads/kirupa/4192/870cad2a543c8218.jpg)

So I changed it to this:  
 ![](http://img412.imageshack.us/img412/7438/goodpigte6.jpg)

but I still get this:

![](http://img405.imageshack.us/img405/7141/notfoundwd1.jpg) ![](http://img235.imageshack.us/img235/82/notfoundzm9.jpg)

I’ve tried using a direct URL (as opposed to relative URL), I tried a “” and a “/”. I think I’ve exhausted all my options.

please help?
