# Output standard template script data

**URL:** <https://discourse.nodered.org/t/output-standard-template-script-data/51304>\
**Category:** General\
**Created:** [20 September 2021 19:44 UTC](https://discourse.nodered.org/t/output-standard-template-script-data/51304 "2021-09-20T19:44:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![notnice](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@notnice](https://discourse.nodered.org/u/notnice)\
**Post date:** [20 September 2021 19:44 UTC](https://discourse.nodered.org/t/output-standard-template-script-data/51304/1 "2021-09-20T19:44:24Z")

</div>

I want users to confirm a web form action in a standard template before its POST'ed to prevent them accidentally erasing some data in the next function.

I have this script in my html which returns true or false on test, but can't find if its possible to pass this onto the connected function node as a payload?

```auto
<script>
function confirm() {
  var result = confirm("If you click OK your access key will be overwritten");
  if (result == true) {
    **I want to pass true as the payload** ;
  } else {
    **I want to pass false as the payload** ;
  }
}
</script>

```

In my html body:

```auto
<form ="form" action="http://1.2.3.4:1880/updateKey?" method="post">
<input type="submit" onclick="confirm()" class="button" value="Update" />

```

---

<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:** [19 November 2021 19:44 UTC](https://discourse.nodered.org/t/output-standard-template-script-data/51304/2 "2021-11-19T19:44:45Z")

</div>

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