# Uib update node

**URL:** <https://discourse.nodered.org/t/uib-update-node/88607>\
**Category:** General\
**Tags:** uibuilder\
**Created:** [10 June 2024 19:18 UTC](https://discourse.nodered.org/t/uib-update-node/88607 "2024-06-10T19:18:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveO](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@DaveO](https://discourse.nodered.org/u/DaveO)\
**Post date:** [10 June 2024 19:18 UTC](https://discourse.nodered.org/t/uib-update-node/88607/1 "2024-06-10T19:18:33Z")

</div>

I am reading HTML and script tagged code from a text file as a single string using the file-read node and sending that to a uib\_update node and then to the uibuilder node.

The HTML elements are updating but the code isn't displaying. However, if I take the same text file and paste it directly into the uibuilder node's index.html file, after the #more tag, the charts display perfectly.

I don't understand why the update node won't work for this.

Here is my test flow and text file.  
[myscript.txt](https://discourse.nodered.org/uploads/short-url/uikviJdLZd1sHkFCeRwe8cchDJ0.txt) (26.1 KB)  
[uib\_update.json](https://discourse.nodered.org/uploads/short-url/tPmPh4vdqu4n6nzlZsKU8op4It8.json) (3.6 KB)

I would like to be able to add charts to a page dynamically.

Thanks,  
Dave

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 June 2024 11:25 UTC](https://discourse.nodered.org/t/uib-update-node/88607/2 "2024-06-11T11:25:00Z")

</div>

Hi Dave,

Code is treated differently by the browser due to security concerns. So with UIBUILDER, sending code to the browser needs to be done separately.

You have a number of ways to load and execute code however. And worth mentioning that the upcoming v7 release has some new features in this area that should make things simpler again.

For now though, if you check the documentation on the low-code features:

> **[UIBUILDER Documentation v6](https://totallyinformation.github.io/node-red-contrib-uibuilder/#/client-docs/config-driven-ui?id=available-methods)**
>
> UIBUILDER Documentation v6

You will see that you could load javascript direct from a file if you wanted to. Do check out some of the limitations and warnings on the above page though as these can catch you out if not careful, especially some timing edge-cases. These aren't really UIBUILDER issues but arise from the way that browsers and HTML work.

In particular, check out the details for the `load` method:

> **[UIBUILDER Documentation v6](https://totallyinformation.github.io/node-red-contrib-uibuilder/#/client-docs/config-driven-ui?id=msg-schema-1)**
>
> UIBUILDER Documentation v6

It lets you either load JS direct from a resource file or pass it as a text string from Node-RED.

---

<div class="post-metadata">

**Author:** ![DaveO](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@DaveO](https://discourse.nodered.org/u/DaveO)\
**Post date:** [11 June 2024 15:49 UTC](https://discourse.nodered.org/t/uib-update-node/88607/3 "2024-06-11T15:49:21Z")

</div>

Okay, thank you for the help @TotallyInformation , much appreciated. Looking forward to V7 as well.

---

<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:** [25 June 2024 15:49 UTC](https://discourse.nodered.org/t/uib-update-node/88607/4 "2024-06-25T15:49:39Z")

</div>

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