# Center popup i tried but no work

**URL:** <https://forum.kirupa.com/t/center-popup-i-tried-but-no-work/34927>\
**Category:** Uncategorized\
**Created:** [November 7, 2003, 11:52pm UTC](https://forum.kirupa.com/t/center-popup-i-tried-but-no-work/34927 "2003-11-07T23:52:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdjstudios](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mdjstudios](https://forum.kirupa.com/u/mdjstudios)\
**Post date:** [November 7, 2003, 11:52pm UTC](https://forum.kirupa.com/t/center-popup-i-tried-but-no-work/34927/1 "2003-11-07T23:52:25Z")

</div>

ok this is what i got so far for my flash button code and for my frame. i wanna make a popup window that is 550 x 400…  
code for button=  
on (release) {  
// customize the window that gets opened  
// 0 equals NO.  
// 1 equals YES.  
address = “[http://www.freewebs.com/headface/Episode1.html](http://www.freewebs.com/headface/Episode1.html)”;  
target\_winName = “HeadFace v5”;  
width = 550;  
height = 400;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 0;  
resizable = 0;  
// sends data back to the function  
openWinCentre(address, target\_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);  
}

thats for my button!  
this is for my frame!:::

\_global.openWinCentre = function(url, winName, w, h, 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);");  
};

now when i press da button the site address come out to be…

javascript:window.open(‘[http://www.freewebs.com/headface/Episode1.html’,‘HeadFace%20v5’,‘width=550,height=400,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top=’+((screen.height/2)-(200))+’,left=’+((screen.width/2)-(275))+’](http://www.freewebs.com/headface/Episode1.html','HeadFace%20v5','width=550,height=400,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top='+((screen.height/2)-(200))+',left='+((screen.width/2)-(275))+')’);void(0);

waz wrong~! plz help!

---

<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:** [November 7, 2003, 11:58pm UTC](https://forum.kirupa.com/t/center-popup-i-tried-but-no-work/34927/2 "2003-11-07T23:58:00Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=38766](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=38766)

Same answer… 😛

---

<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:** [November 8, 2003, 12:51am UTC](https://forum.kirupa.com/t/center-popup-i-tried-but-no-work/34927/3 "2003-11-08T00:51:29Z")

</div>

Nope! I did the same thing! I know the exact problem solution. First of all, the page that you want to pop-up, customize it however you want with whatever content, then, in the \<head\> tag, put: **\<title\>HeadFace v5\</title\>**. Now, open the panel for the button actions, where it says: **target\_winName = “HeadFace v5”;** , replace with:

```auto
target_winName = "name";

```

Keep the target\_winName as name. Test in browser (ctrl+F12 [win] || apple+F12 [mac])

- Should do the job.

---

<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:** [November 8, 2003, 12:57am UTC](https://forum.kirupa.com/t/center-popup-i-tried-but-no-work/34927/4 "2003-11-08T00:57:08Z")

</div>

LOL! I didn’t see the space in there!! 😛

---

<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:** [November 8, 2003, 5:51pm UTC](https://forum.kirupa.com/t/center-popup-i-tried-but-no-work/34927/5 "2003-11-08T17:51:46Z")

</div>

thx guys! but i found out the real problem was that my code was fine, but when i tested it out ONLINE it was perfect. when i tested it on flash it wouldnt work, but online it worked great. thx for your help anyways :beam:

wait… it weird… it works for my main thing but on my intro i had to do the \<title\>HeadFace v5\</title\> thing… thanks again for your help i am eternally greatful

WAIIIITTT… ok now i did what u said and now it doesnt work, pop up works but the popup is the same as what i said up in my first post…

jeez sorry bout that, now all of a sudden it works, i think… or maybe im hallucinating…

ok now it dont work on the web… im soo gots headache…

---

<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:** [November 12, 2003, 1:21am UTC](https://forum.kirupa.com/t/center-popup-i-tried-but-no-work/34927/6 "2003-11-12T01:21:37Z")

</div>

i had the same situation but finally got it working …on my pc here  
but when i transfer my files to the server it doesnt work anymore  
i really have no idea what difference does it make  
if you check my site [www.luthan.com](http://www.luthan.com) you will see that if you click pictures, nothing will happen  
but on my pc it works like a charm  
any idea why it does that?  
thanks
