# Get location.href and pass it to other nodes

**URL:** <https://discourse.nodered.org/t/get-location-href-and-pass-it-to-other-nodes/21406>\
**Category:** Dashboard\
**Created:** [7 February 2020 16:56 UTC](https://discourse.nodered.org/t/get-location-href-and-pass-it-to-other-nodes/21406 "2020-02-07T16:56:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lenny1972](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lenny1972/32/13210_2.png) [@lenny1972](https://discourse.nodered.org/u/lenny1972)\
**Post date:** [7 February 2020 16:56 UTC](https://discourse.nodered.org/t/get-location-href-and-pass-it-to-other-nodes/21406/1 "2020-02-07T16:56:04Z")

</div>

For my project I need to get the location.href displayed in the browser used for accessing the UI dashboard (i.e. localhost:1880/ui) and then use this information in other flows, or better set this info in a flow/global variable. I've tried to use a ui\_template node with a simple script that shows a window with the browser location.href) but I didn't find a way to grab this info and bring it inside my flow. Is there a way for doing that?

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [7 February 2020 18:51 UTC](https://discourse.nodered.org/t/get-location-href-and-pass-it-to-other-nodes/21406/2 "2020-02-07T18:51:12Z")

</div>

Did you consider using instead the ui\_ui\_control node ? As far as I know it will return to the runtime the very same information you would get from `window.location.href`

![b-1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c1046c02d99434dd68593a0b57fe38b9b964d074.png)

![b-2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/7/e779da2cd6eea52ecf55f222812b435aeae3b0d5.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 March 2020 18:51 UTC](https://discourse.nodered.org/t/get-location-href-and-pass-it-to-other-nodes/21406/3 "2020-03-08T18:51:12Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
