# Stop EmbeddedView from opening new tab after setting props.path

**URL:** <https://forum.inductiveautomation.com/t/stop-embeddedview-from-opening-new-tab-after-setting-props-path/51677>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 6, 2021, 9:50pm UTC](https://forum.inductiveautomation.com/t/stop-embeddedview-from-opening-new-tab-after-setting-props-path/51677 "2021-10-06T21:50:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![israel.jordan](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@israel.jordan](https://forum.inductiveautomation.com/u/israel.jordan)\
**Post date:** [October 6, 2021, 9:50pm UTC](https://forum.inductiveautomation.com/t/stop-embeddedview-from-opening-new-tab-after-setting-props-path/51677/1 "2021-10-06T21:50:21Z")

</div>

Hello all,

I have an EmbeddedView which has two Message Handlers configured for it. I am using script inside an onItemClicked event in a HorizontalMenu to send the message to the Handlers. I am able to successfully change the path of the EmbeddedView but a new “unwanted” tab also opens. Can someone please help me understand why the new tab is opening and how to stop it?

Kind regards

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [October 7, 2021, 2:46am UTC](https://forum.inductiveautomation.com/t/stop-embeddedview-from-opening-new-tab-after-setting-props-path/51677/2 "2021-10-07T02:46:00Z")

</div>

Please post you script, so we can start there and let you know if we see any issues with it.

---

<div class="post-metadata">

**Author:** ![israel.jordan](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@israel.jordan](https://forum.inductiveautomation.com/u/israel.jordan)\
**Post date:** [October 7, 2021, 2:39pm UTC](https://forum.inductiveautomation.com/t/stop-embeddedview-from-opening-new-tab-after-setting-props-path/51677/3 "2021-10-07T14:39:27Z")

</div>

Sure, below is an example of how I am changing the path using the Message Handler that is on my EmbeddedView

> self.props.path = "_path\_to\_view_"

And here is an example of how I am calling the Message Handler from an onItemClicked event that is on my HorizontalMenu

> system.perspective.sendMessage("_handler\_name_")

The event fires, the handler is called and the path changes. But another tab opens up with a 404 error. I'm trying to stop that tab from opening.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 7, 2021, 2:54pm UTC](https://forum.inductiveautomation.com/t/stop-embeddedview-from-opening-new-tab-after-setting-props-path/51677/4 "2021-10-07T14:54:30Z")

</div>

The Horizontal Menu performs navigation when items are clicked. That’s just what the component does. There is no way to intercept the navigation, other than to modify the navigation to either be a Perspective page sort of navigation or a URL navigation. If you want to change the path of an Embedded View, then you will need to use a different component.

---

<div class="post-metadata">

**Author:** ![David\_Nicks](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@David\_Nicks](https://forum.inductiveautomation.com/u/David_Nicks)\
**Post date:** [June 16, 2024, 3:41am UTC](https://forum.inductiveautomation.com/t/stop-embeddedview-from-opening-new-tab-after-setting-props-path/51677/5 "2024-06-16T03:41:10Z")

</div>

This might help:

> [@Perspective Horizontal Menu - Passing Parameters](https://forum.inductiveautomation.com/t/perspective-horizontal-menu-passing-parameters/65392/7):
>
> I had a similar issue and developed a fairly decent workaround. In my situation, I have a parent view with an embedded view that is used to host custom content for equipment that is organized in a hierarchy. There is a session custom prop that points to the id of the current location in the hierarchy, and the embedded view path is bound to a query that uses that id to return the path to a corresponding sub-view. The horizontal menu is bound to a query that uses the same id to return data about…
