# Reload site after http response

**URL:** <https://discourse.nodered.org/t/reload-site-after-http-response/81220>\
**Category:** General\
**Created:** [12 September 2023 06:21 UTC](https://discourse.nodered.org/t/reload-site-after-http-response/81220 "2023-09-12T06:21:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![einfach112](https://avatars.discourse-cdn.com/v4/letter/e/3da27b/32.png) [@einfach112](https://discourse.nodered.org/u/einfach112)\
**Post date:** [12 September 2023 06:21 UTC](https://discourse.nodered.org/t/reload-site-after-http-response/81220/1 "2023-09-12T06:21:18Z")

</div>

Hello everyone,  
I have another problem that I don't understand.  
I have created a form with the following flow.  
When I enter data there I get the correct answer. However, I can't get the form to reset itself after sending the data. I have already tried setting a hiddenfield and with the hiddenfield set a location.reload()  
to do it... but it didn't work.  
Can someone tell me how I can do this?

```auto
[
    {
        "id": "33286a393cb9bcb3",
        "type": "tab",
        "label": "testflow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "4f14f0934e33dd01",
        "type": "debug",
        "z": "33286a393cb9bcb3",
        "name": "debug 403",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "true",
        "targetType": "full",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 4690,
        "y": 160,
        "wires": []
    },
    {
        "id": "017c5b033569a9b3",
        "type": "template",
        "z": "33286a393cb9bcb3",
        "name": "",
        "field": "payload",
        "fieldType": "msg",
        "format": "html",
        "syntax": "plain",
        "template": "<html>\n <head>\n <title>\n Artikel hinzufügen\n </title>\n </head>\n <body>\n<form name=\"form1\" method=\"post\" action=\"\">\n <input name=\"textfield\" type=\"text\" maxlength=\"256\">\n<button type='button'>submit</button>\n</form>\n\n</body>\n \n</html>",
        "output": "str",
        "x": 4500,
        "y": 80,
        "wires": [
            [
                "07d82728b54e1019"
            ]
        ]
    },
    {
        "id": "e95d3fc44d6d3afc",
        "type": "http in",
        "z": "33286a393cb9bcb3",
        "name": "",
        "url": "/artikel",
        "method": "get",
        "upload": false,
        "swaggerDoc": "",
        "x": 4350,
        "y": 80,
        "wires": [
            [
                "017c5b033569a9b3"
            ]
        ]
    },
    {
        "id": "07d82728b54e1019",
        "type": "http response",
        "z": "33286a393cb9bcb3",
        "name": "",
        "statusCode": "",
        "headers": {},
        "x": 4630,
        "y": 80,
        "wires": []
    },
    {
        "id": "45d32a30a1616c52",
        "type": "http in",
        "z": "33286a393cb9bcb3",
        "name": "",
        "url": "/artikel",
        "method": "post",
        "upload": false,
        "swaggerDoc": "",
        "x": 4450,
        "y": 160,
        "wires": [
            [
                "4f14f0934e33dd01"
            ]
        ]
    }
]

```

---

<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:** [12 September 2023 13:45 UTC](https://discourse.nodered.org/t/reload-site-after-http-response/81220/2 "2023-09-12T13:45:01Z")

</div>

Something like this should probably work:

```auto
  const f = document.forms.form1
  f.onsubmit = function () {
    f.reset()
  }

```

---

<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:** [11 November 2023 13:45 UTC](https://discourse.nodered.org/t/reload-site-after-http-response/81220/3 "2023-11-11T13:45:52Z")

</div>

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