# Read variable value from HTML (ui\_template)

**URL:** <https://discourse.nodered.org/t/read-variable-value-from-html-ui-template/90678>\
**Category:** General\
**Created:** [3 September 2024 11:57 UTC](https://discourse.nodered.org/t/read-variable-value-from-html-ui-template/90678 "2024-09-03T11:57:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertobuti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robertobuti/32/81936_2.png) [@robertobuti](https://discourse.nodered.org/u/robertobuti)\
**Post date:** [3 September 2024 11:57 UTC](https://discourse.nodered.org/t/read-variable-value-from-html-ui-template/90678/1 "2024-09-03T11:57:46Z")

</div>

Hello,  
i'm using ui\_template for simple welcome popup on program startup, i like show welcome message and SW version, the value is stored in global variable named "versione".  
I have used the this sintax, but doens't work, variable field still empyt.  
Where i'm wrong ?

```
<p>Firmware Version:{{global.get("versione")}}</p>

```

thank for help.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [3 September 2024 12:06 UTC](https://discourse.nodered.org/t/read-variable-value-from-html-ui-template/90678/2 "2024-09-03T12:06:13Z")

</div>

Context vars are server side, you can not access them in the browser. Move the context var to a msg property prior to the template node.

---

<div class="post-metadata">

**Author:** ![robertobuti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robertobuti/32/81936_2.png) [@robertobuti](https://discourse.nodered.org/u/robertobuti)\
**Post date:** [3 September 2024 14:12 UTC](https://discourse.nodered.org/t/read-variable-value-from-html-ui-template/90678/3 "2024-09-03T14:12:18Z")

</div>

Ok noted, i will try to sent from msg.payload  
thank

---

<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:** [2 December 2024 14:12 UTC](https://discourse.nodered.org/t/read-variable-value-from-html-ui-template/90678/4 "2024-12-02T14:12:39Z")

</div>

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