# Dynamic URL Window Pop-up in NODE HTML template

**URL:** <https://discourse.nodered.org/t/dynamic-url-window-pop-up-in-node-html-template/95752>\
**Category:** Dashboard\
**Tags:** node-red-dashboard, html\
**Created:** [2 March 2025 09:21 UTC](https://discourse.nodered.org/t/dynamic-url-window-pop-up-in-node-html-template/95752 "2025-03-02T09:21:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gtei](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@gtei](https://discourse.nodered.org/u/gtei)\
**Post date:** [2 March 2025 09:21 UTC](https://discourse.nodered.org/t/dynamic-url-window-pop-up-in-node-html-template/95752/1 "2025-03-02T09:21:19Z")

</div>

Hi, I would like to open a dynamic URL by clicking on a button using the HTML template node.

My msg.payload has the following items:

- name: device name of device
- MAC: device MAC address
- IP: device IP address

I would like to render a HTML button on the HTML template node that will open a HTML Window to the IP address of the device via HTTP.

My HTML script for the HTML template node is:

```auto
<div>
    <table border="1" ng-if="msg.existingDevs.length">
        <tr id="devlist_Row" ng-repeat="row in msg.existingDevs">
            <td>{{row.name}}</td>
            <td>{{row.MAC}}</td>
            <td>{{row.IP}}</td>
           <td><button onclick="window.open('http://{{row.IP}}', '_blank', 'width=800,height=600');">Open {{row.name}}</button></td>
        </tr>
    </table>
</div>

```

I am not able to render the page obvious the `{{row.IP}}` shouldn't be injected into the HTML of the button script in such a manner.

How do I inject the `{{row.IP}}` into the example IP Address of `http://192.168.1.111` so that upon clicking the button, a browser window would be rendered for the Device's console panel in another window for the Device with IP of 192.168.1.111 ?

---

<div class="post-metadata">

**Author:** ![gtei](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@gtei](https://discourse.nodered.org/u/gtei)\
**Post date:** [2 March 2025 12:59 UTC](https://discourse.nodered.org/t/dynamic-url-window-pop-up-in-node-html-template/95752/2 "2025-03-02T12:59:40Z")

</div>

Managed to solve the original question. Just use ng-click.

---

<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:** [16 March 2025 12:59 UTC](https://discourse.nodered.org/t/dynamic-url-window-pop-up-in-node-html-template/95752/3 "2025-03-16T12:59:43Z")

</div>

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