# Navigation help

**URL:** <https://forum.inductiveautomation.com/t/navigation-help/3355>\
**Category:** Ignition\
**Created:** [September 28, 2011, 4:04pm UTC](https://forum.inductiveautomation.com/t/navigation-help/3355 "2011-09-28T16:04:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecujak](https://avatars.discourse-cdn.com/v4/letter/e/839c29/32.png) [@ecujak](https://forum.inductiveautomation.com/u/ecujak)\
**Post date:** [September 28, 2011, 4:04pm UTC](https://forum.inductiveautomation.com/t/navigation-help/3355/1 "2011-09-28T16:04:31Z")

</div>

Please someone give me some hints or point me in the right direction.

I want a navbar at the top. So on my navbar or have main\_button and SubMain\_button. I see how to make it so a button opens another window. I see the option to swap/close, but this will close my navbar window.

Is there a way to use buttons in my north window (my navbar) to open a new floating window and close the active floating window but not the parent window(my navbar) of the button being pressed, (without having a case statement for each window name in the project)?

I see that `system.nav.openWindow('mitp')` opens the new target.

Is there something like `system.nav.CloseWindow(avtiveFloatingWindow)` ?

---

<div class="post-metadata">

**Author:** ![ecujak](https://avatars.discourse-cdn.com/v4/letter/e/839c29/32.png) [@ecujak](https://forum.inductiveautomation.com/u/ecujak)\
**Post date:** [September 28, 2011, 6:29pm UTC](https://forum.inductiveautomation.com/t/navigation-help/3355/2 "2011-09-28T18:29:50Z")

</div>

![:prayer:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e5a7e3b63facc151ea73e3b45db7bdb3d4bdc316.gif ":prayer:") … bump…

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [September 28, 2011, 7:43pm UTC](https://forum.inductiveautomation.com/t/navigation-help/3355/3 "2011-09-28T19:43:52Z")

</div>

system.nav.swapTo(“Alarm Distribution Lists”)

---

<div class="post-metadata">

**Author:** ![ecujak](https://avatars.discourse-cdn.com/v4/letter/e/839c29/32.png) [@ecujak](https://forum.inductiveautomation.com/u/ecujak)\
**Post date:** [September 28, 2011, 8:19pm UTC](https://forum.inductiveautomation.com/t/navigation-help/3355/4 "2011-09-28T20:19:04Z")

</div>

> [@diat150](#):
>
> Alarm Distribution Lists

lol

```auto
Traceback (innermost last):

  File "<event:actionPerformed>", line 7, in ?

ValueError: Window 'Alarm Distribution Lists' does not exist.

Ignition v7.2.8 (b178)
Java: Sun Microsystems Inc. 1.6.0_26

```

So the parent of the action is the navbar(north Window). If I issue a swap from there it will close my nave bar. How can a call a command to close the floating(main) window before opening a new window, without closing my navbar(parent of event). Is there a global variable for avtive windows? Can I create a global variable and store the main window ID in it each time a new window opens and then manually open my new window.

```auto
system.nav.closeWindow(oldMain)
system.nav.openWindow('new_window')
oldMain = 'new_window'
```

I would think there would be a better way to do this. ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [September 28, 2011, 8:45pm UTC](https://forum.inductiveautomation.com/t/navigation-help/3355/5 "2011-09-28T20:45:02Z")

</div>

Do you have your navbar window docked north and your main window maximized?

[The system.nav.swapTo](http://www.inductiveautomation.com/support/usermanuals/ignition/system_nav_swapto.htm) function should work as you’re requesting. You can also see [system.nav.swapWindow](http://www.inductiveautomation.com/support/usermanuals/ignition/system_nav_swapwindow.htm)

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [September 28, 2011, 9:13pm UTC](https://forum.inductiveautomation.com/t/navigation-help/3355/6 "2011-09-28T21:13:12Z")

</div>

Have you read [this section](http://www.inductiveautomation.com/support/usermanuals/ignition/index.html?typical_navigation_strategy.htm) of the user manual? Also - download and play around with the Ignition [Example Project](http://www.inductiveautomation.com/downloads/extras) to see this in action.

---

<div class="post-metadata">

**Author:** ![ecujak](https://avatars.discourse-cdn.com/v4/letter/e/839c29/32.png) [@ecujak](https://forum.inductiveautomation.com/u/ecujak)\
**Post date:** [September 29, 2011, 1:14pm UTC](https://forum.inductiveautomation.com/t/navigation-help/3355/7 "2011-09-29T13:14:13Z")

</div>

ok, thanks.

```auto
system.nav.swapTo('Main_Menu')
```

This did the trick. I wish there was a way to ID the current main window. Does this swap remove resources from the active window? Does it remove the resources before the new window is created?

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [September 29, 2011, 2:29pm UTC](https://forum.inductiveautomation.com/t/navigation-help/3355/8 "2011-09-29T14:29:05Z")

</div>

This seems to be a popular topic. See [this thread](http://inductiveautomation.com/forum/viewtopic.php?f=71&t=6974).

@ecujak, check out this (2008) [video on Navigation](http://inductiveautomation.com/videos/video/21/3). The designer looks a little different, but the navigation principals are still the same.

As far as the tab strip, that works a little differently. When set on the default “Swap to window” Navigation mode, you need to do the following: In the Tab Data dataset, the NAME field needs to match your window names exactly (it is case sensitive). You can show whatever you want in the corresponding DISPLAY\_NAME. The best way to edit this is via the Tab Strip Customizer, by right clicking the tab strip -\> customizers -\> tab strip customizer (or Cntl+U).
