# swapTO window

**URL:** <https://forum.inductiveautomation.com/t/swapto-window/6859>\
**Category:** Ignition\
**Created:** [July 12, 2013, 1:35pm UTC](https://forum.inductiveautomation.com/t/swapto-window/6859 "2013-07-12T13:35:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [July 12, 2013, 1:35pm UTC](https://forum.inductiveautomation.com/t/swapto-window/6859/1 "2013-07-12T13:35:38Z")

</div>

I have a main window and a header window. I am trying to swap the main window  
with this script which is activated by a button event on the header window.  
I can’t seem to get the other window to swap instead of closing my header window the button is on.  
I thought this would work.

`window = system.tag.read("[System]Client/User/CurrentWindow").value
system.nav.swapWindow(window, "MainLayoutDash")`

---

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [July 13, 2013, 7:38pm UTC](https://forum.inductiveautomation.com/t/swapto-window/6859/2 "2013-07-13T19:38:25Z")

</div>

I have a north docked window and a main window. I’m trying to trigger a swap on the main window from the docked one.

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [July 15, 2013, 6:56pm UTC](https://forum.inductiveautomation.com/t/swapto-window/6859/3 "2013-07-15T18:56:34Z")

</div>

Testing this here it seems to work fine. Is your docked window actually a docked window? It sounds to me like this may actually be a floating window. I did a cut and paste of your sample code and only changed the name of the window I want to swap to and it worked.

Please include the Ignition version if there is still an issue

---

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [July 16, 2013, 2:04pm UTC](https://forum.inductiveautomation.com/t/swapto-window/6859/4 "2013-07-16T14:04:11Z")

</div>

This works for me now. I don’t know what to say about it since all I did to fix this is to delete the commented out script. Thanks for the reassurance I needed.

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [July 30, 2013, 3:55pm UTC](https://forum.inductiveautomation.com/t/swapto-window/6859/5 "2013-07-30T15:55:53Z")

</div>

No problem, glad to hear you have it working!
