# Open popup on specific location after dragging, closing and re-open

**URL:** <https://forum.inductiveautomation.com/t/open-popup-on-specific-location-after-dragging-closing-and-re-open/26603>\
**Category:** Ignition\
**Created:** [July 17, 2019, 4:08am UTC](https://forum.inductiveautomation.com/t/open-popup-on-specific-location-after-dragging-closing-and-re-open/26603 "2019-07-17T04:08:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [July 17, 2019, 4:08am UTC](https://forum.inductiveautomation.com/t/open-popup-on-specific-location-after-dragging-closing-and-re-open/26603/1 "2019-07-17T04:08:30Z")

</div>

Hi, I have a popup that I want to open on a floating position different from center. By unchecking the defaut option “and center” on compenent scripting it opens on the Location from the configuration of the window property (x=0,y=0 ) as expected. But if I drag the popup to another position, close it and re-open. It keeps the last position of were it was dragged and not the default configuration.

I have found this on documentation

"  
Location The location that this window will open up at. Only applicable to floating windows that are not set to start maximized. Also, you must un-check the “Center Window” checkbox on the open-window navigation action in order for this location to take effect

Scripting name startingLocation

* * *

Data type Point  
"

How do I set the “Point” Datatype?

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [July 17, 2019, 5:37pm UTC](https://forum.inductiveautomation.com/t/open-popup-on-specific-location-after-dragging-closing-and-re-open/26603/2 "2019-07-17T17:37:16Z")

</div>

I solved it and it was actually pretty easy. Just made 2 lines code on popup event handlers scripting on visionWindowOpened and Closed and it is:

window = system.gui.getParentWindow(event)  
window.setLocation(0,0)

It’s hard to find out for beginners
