# How can I open a HTML pop up window?

**URL:** <https://forum.kirupa.com/t/how-can-i-open-a-html-pop-up-window/63898>\
**Category:** flash\
**Created:** [September 11, 2004, 1:29am UTC](https://forum.kirupa.com/t/how-can-i-open-a-html-pop-up-window/63898 "2004-09-11T01:29:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![worldsound](https://avatars.discourse-cdn.com/v4/letter/w/ee7513/32.png) [@worldsound](https://forum.kirupa.com/u/worldsound)\
**Post date:** [September 11, 2004, 1:29am UTC](https://forum.kirupa.com/t/how-can-i-open-a-html-pop-up-window/63898/1 "2004-09-11T01:29:59Z")

</div>

Hi everyone!

I found a tutorial where I can open a centered pop up window… good!  
And I also found a tutorial where I can open a pop up window at the upper left side of my main html window… good too!

And how about choosing my X and Y position of my window? Is there anyway I can do this? Not at the top left nor centered…

Thanks!

---

<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 11, 2004, 3:12am UTC](https://forum.kirupa.com/t/how-can-i-open-a-html-pop-up-window/63898/2 "2004-09-11T03:12:18Z")

</div>

so let’s say you’re looking at [this tutorial](http://www.kirupa.com/developer/mx/centered_popup.htm)…  
see the AS:[AS]  
\_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);");  
};[/AS]  
try changing the bold parts to your desired x and y positions.

---

<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 11, 2004, 6:53pm UTC](https://forum.kirupa.com/t/how-can-i-open-a-html-pop-up-window/63898/3 "2004-09-11T18:53:41Z")

</div>

Thanks for your help, but I’m a beginner / medium Flash Designer…  
Imagine that I want my window at  
x= 50  
y=200

Can you write me the right code?

Thanks a lot.

---

<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 11, 2004, 6:58pm UTC](https://forum.kirupa.com/t/how-can-i-open-a-html-pop-up-window/63898/4 "2004-09-11T18:58:31Z")

</div>

[AS]\_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=’+200+’,left=’+50+’"+"’);void(0);");  
};[/AS]all you had to do was change what was in bold to 200 and 50.

---

<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 12, 2004, 5:43am UTC](https://forum.kirupa.com/t/how-can-i-open-a-html-pop-up-window/63898/5 "2004-09-12T05:43:50Z")

</div>

Hi!

Now I’m done! 🙂

Thanks a lot. It works!

Now that I see you are expert, can you help me with this problem?  
[http://www.kirupaforum.com/forums/showthread.php?t=69615](http://www.kirupaforum.com/forums/showthread.php?t=69615)

Thanks… I’m learning a lot here in [Kirupa.com](http://Kirupa.com)  
I never Thought a forum could be so helpful! 😃
