# Yet another popup window problem

**URL:** <https://forum.kirupa.com/t/yet-another-popup-window-problem/9089>\
**Category:** Uncategorized\
**Created:** [December 4, 2002, 5:27pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089 "2002-12-04T17:27:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chupa](https://avatars.discourse-cdn.com/v4/letter/c/bbce88/32.png) [@Chupa](https://forum.kirupa.com/u/Chupa)\
**Post date:** [December 4, 2002, 5:27pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/1 "2002-12-04T17:27:37Z")

</div>

Hey all,

ok i am having some troubles with the launch a centered popup. i’ve uploaded my html page(s) and swf & it still doesnt work right. when it launches the widow i get a “syntax error” and you can see the whole java code in the address bar. any idea what the hell’s going on?

oh, and i’ve tried “publishing” it and still no luck.

tks in advance 🙂

[http://d7.bz/wwv/index.htm](http://d7.bz/wwv/index.htm)  
[http://d7.bz/wwv/wwv.zip](http://d7.bz/wwv/wwv.zip)

---

<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:** [December 4, 2002, 5:32pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/2 "2002-12-04T17:32:44Z")

</div>

Did you download the source file from the tutorial and compare your code.

Are you testing it right out of flash when you preview a movie or through the browser? You should be doing it from inside a browser since the functions it uses are translated by the browser in order to open the new window 🙂

---

<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:** [December 4, 2002, 5:36pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/3 "2002-12-04T17:36:34Z")

</div>

through a browser, and yes to all of the above 🙂

i posted the links above to the fla and the index.htm

---

<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:** [December 4, 2002, 5:38pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/4 "2002-12-04T17:38:22Z")

</div>

Bah, you edited when I replied…lol.

Both those links give me nothing.

---

<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:** [December 4, 2002, 5:38pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/5 "2002-12-04T17:38:49Z")

</div>

try now

---

<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:** [December 4, 2002, 5:41pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/6 "2002-12-04T17:41:57Z")

</div>

Nope… i just get an incredibly slow loading page for the html file and a error saying could not connect to server for the .zip file.

---

<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:** [December 4, 2002, 6:00pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/7 "2002-12-04T18:00:19Z")

</div>

[http://useful-idiot.net/w/index.htm](http://useful-idiot.net/w/index.htm)

can you see that?

---

<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:** [December 4, 2002, 6:04pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/8 "2002-12-04T18:04:35Z")

</div>

well i’ve been told the server is down, but some people can see it. i guess we’ll just have to wait. thanks though…

---

<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:** [December 4, 2002, 6:10pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/9 "2002-12-04T18:10:34Z")

</div>

Nope, I can’t see that.

The server may be down to certain parts of the country and not to others.

So waiting it is 🙂

---

<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:** [December 4, 2002, 7:43pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/10 "2002-12-04T19:43:28Z")

</div>

is it working for you yet? :asian:

---

<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:** [December 4, 2002, 7:44pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/11 "2002-12-04T19:44:52Z")

</div>

nope:(

---

<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:** [December 5, 2002, 2:58am UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/12 "2002-12-05T02:58:30Z")

</div>

how about now?

---

<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:** [December 6, 2002, 1:55am UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/13 "2002-12-06T01:55:24Z")

</div>

Ok it works now, and I checked the.html file, but I can’t find the pop up link. I swear I tried everything in there and not one of them launches a pop up. They all change the flash inside.

---

<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:** [December 7, 2002, 5:26pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/14 "2002-12-07T17:26:30Z")

</div>

i no understan… what’s wrong with it? no code? :ninja:

---

<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:** [December 7, 2002, 5:42pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/15 "2002-12-07T17:42:17Z")

</div>

Well which link is supposed to open the pop up window?

After I know what link to press, it will be much easier to see, and find in the file.

---

<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:** [December 7, 2002, 6:45pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/16 "2002-12-07T18:45:27Z")

</div>

guestbook 🙂

---

<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:** [December 7, 2002, 7:01pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/17 "2002-12-07T19:01:17Z")

</div>

Well your problem is that you never defined the Prototype that the script calls on from your button.

On your frame you have an action that says something that makes absolutely not sense… that would be this line…

```auto
getURL("on (release) {
	getURL(\"javascript:newWin('pic_show.html','imageGallery','280','315','0','0')\");
}");

```

Now, I removed that line, because there was no point to it and I added this in there…

```auto
Movieclip.prototype.openWinCentre = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
	getURL("javascript:var myWin; if(!myWin || myWin.closed){myWin = 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{myWin.focus();};void(0);");
};

```

And everything works perfectly. Note: Remove space between “java” and “script” (no quotes), the board automatically does that.

---

<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:** [December 7, 2002, 7:11pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/18 "2002-12-07T19:11:38Z")

</div>

ok now where do i add the guestbook.htm?

---

<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:** [December 7, 2002, 7:12pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/19 "2002-12-07T19:12:58Z")

</div>

I changed nothing on your button code.

I just added the above code onto the frame and everything was fine.

---

<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:** [December 7, 2002, 7:15pm UTC](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089/20 "2002-12-07T19:15:24Z")

</div>

oh ok. so what do i put on the button?

[Next page](https://forum.kirupa.com/t/yet-another-popup-window-problem/9089.md?page=2)
