# Saving node parameter in an variable in the html file

**URL:** <https://discourse.nodered.org/t/saving-node-parameter-in-an-variable-in-the-html-file/65576>\
**Category:** Developing Nodes\
**Tags:** function-node\
**Created:** [25 July 2022 11:55 UTC](https://discourse.nodered.org/t/saving-node-parameter-in-an-variable-in-the-html-file/65576 "2022-07-25T11:55:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![OsamaAlAhmadieh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/osamaalahmadieh/32/65183_2.png) [@OsamaAlAhmadieh](https://discourse.nodered.org/u/OsamaAlAhmadieh)\
**Post date:** [25 July 2022 11:55 UTC](https://discourse.nodered.org/t/saving-node-parameter-in-an-variable-in-the-html-file/65576/1 "2022-07-25T11:55:13Z")

</div>

I have a node for which i am setting different attributes (Name, fruit, vegetable) from a typedInput.

For further processing, I want to get the values that I set for each parameter into my html file in which i define the node. I have tried using $('node-input-param\_name').typedInput.('value') as mentioned by the documentation on the typed Input webpage. [TypedInput - get value](https://nodered.org/docs/api/ui/typedInput/#methods-value-get) but it didn't work, and it returns something like `s.fn.init [prevObject: s.fn.init(1)]`.

I can't find a way to get the string value that I chose for the parameter in node-red, and assign it to a variable in my htm file.

Thank you!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 July 2022 12:26 UTC](https://discourse.nodered.org/t/saving-node-parameter-in-an-variable-in-the-html-file/65576/2 "2022-07-25T12:26:42Z")

</div>

> [@OsamaAlAhmadieh](#):
>
> $('node-input-param\_name').typedInput.('value')

Try without the dot after `typedInput`

```auto
const v = $('node-input-param_name').typedInput('value')

```

Also depends on the typed input type. For example some only have `type` and no value...

```auto
const t = $('node-input-param_name').typedInput('type')

```

---

<div class="post-metadata">

**Author:** ![OsamaAlAhmadieh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/osamaalahmadieh/32/65183_2.png) [@OsamaAlAhmadieh](https://discourse.nodered.org/u/OsamaAlAhmadieh)\
**Post date:** [25 July 2022 12:33 UTC](https://discourse.nodered.org/t/saving-node-parameter-in-an-variable-in-the-html-file/65576/3 "2022-07-25T12:33:13Z")

</div>

Thanks for the reply !

I aleady had it without the dot, it was a typo while creating the issue, sorry about that.

Unfortunately, passing the ('type') argument doesn't work as well. I am getting `undefined` as output now.

Are you aware of any node that implements such a functionality, so I can check its source code on github for example?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 July 2022 12:45 UTC](https://discourse.nodered.org/t/saving-node-parameter-in-an-variable-in-the-html-file/65576/4 "2022-07-25T12:45:08Z")

</div>

Sorry, also just noticed you don't have a # symbol at the beginning of the selector...

```auto
const v = $('#node-input-param_name').typedInput('value')

```

---

<div class="post-metadata">

**Author:** ![OsamaAlAhmadieh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/osamaalahmadieh/32/65183_2.png) [@OsamaAlAhmadieh](https://discourse.nodered.org/u/OsamaAlAhmadieh)\
**Post date:** [25 July 2022 12:49 UTC](https://discourse.nodered.org/t/saving-node-parameter-in-an-variable-in-the-html-file/65576/5 "2022-07-25T12:49:19Z")

</div>

That solved it. 🤦‍♂️

Apologies and thanks for replying so quick.

I couldn't find advanced documentation for stuff like this, and was relying simply on examples and posts from other people on the forum, is there a place where such documentation is found?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 July 2022 12:50 UTC](https://discourse.nodered.org/t/saving-node-parameter-in-an-variable-in-the-html-file/65576/6 "2022-07-25T12:50:08Z")

</div>

> [@OsamaAlAhmadieh](#):
>
> is there a place where such documentation is found

Yes, in the official docs. Link at top of forum...

[https://nodered.org/docs/api/ui/typedInput/](https://nodered.org/docs/api/ui/typedInput/)

---

<div class="post-metadata">

**Author:** ![OsamaAlAhmadieh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/osamaalahmadieh/32/65183_2.png) [@OsamaAlAhmadieh](https://discourse.nodered.org/u/OsamaAlAhmadieh)\
**Post date:** [25 July 2022 12:52 UTC](https://discourse.nodered.org/t/saving-node-parameter-in-an-variable-in-the-html-file/65576/7 "2022-07-25T12:52:44Z")

</div>

Thanks for helping out !

---

<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 August 2022 12:52 UTC](https://discourse.nodered.org/t/saving-node-parameter-in-an-variable-in-the-html-file/65576/8 "2022-08-08T12:52:49Z")

</div>

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