# Set popup location for y axis only?

**URL:** <https://forum.inductiveautomation.com/t/set-popup-location-for-y-axis-only/14201>\
**Category:** Ignition\
**Created:** [May 3, 2017, 3:24pm UTC](https://forum.inductiveautomation.com/t/set-popup-location-for-y-axis-only/14201 "2017-05-03T15:24:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbrannen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbrannen/32/3459_2.png) [@sbrannen](https://forum.inductiveautomation.com/u/sbrannen)\
**Post date:** [May 3, 2017, 3:24pm UTC](https://forum.inductiveautomation.com/t/set-popup-location-for-y-axis-only/14201/1 "2017-05-03T15:24:29Z")

</div>

Greetings…

I would like to set the location of a popup to x=center and y=200. How to accomplish with script? The setLocation requires two args and I only want to set one.

Cheers,  
Steve

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [May 3, 2017, 4:29pm UTC](https://forum.inductiveautomation.com/t/set-popup-location-for-y-axis-only/14201/2 "2017-05-03T16:29:39Z")

</div>

From top of my head…

```auto
window = system.gui.getWindow("Popup")
system.nav.centerWindow(window)
window.setLocation(windows.X,200)

```

or something like:

```auto
window.setLocation(parentwindow.width/2 - window.width/2,200)

```

---

<div class="post-metadata">

**Author:** ![sbrannen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbrannen/32/3459_2.png) [@sbrannen](https://forum.inductiveautomation.com/u/sbrannen)\
**Post date:** [May 3, 2017, 5:18pm UTC](https://forum.inductiveautomation.com/t/set-popup-location-for-y-axis-only/14201/3 "2017-05-03T17:18:12Z")

</div>

Thanks Jan… ‘or something like’ worked perfectly!
