# Flow fails to load result page after Ajax form submit

**URL:** <https://discourse.nodered.org/t/flow-fails-to-load-result-page-after-ajax-form-submit/18809>\
**Category:** General\
**Created:** [5 December 2019 04:23 UTC](https://discourse.nodered.org/t/flow-fails-to-load-result-page-after-ajax-form-submit/18809 "2019-12-05T04:23:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FriendlyDre](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FriendlyDre](https://discourse.nodered.org/u/FriendlyDre)\
**Post date:** [5 December 2019 04:23 UTC](https://discourse.nodered.org/t/flow-fails-to-load-result-page-after-ajax-form-submit/18809/1 "2019-12-05T04:23:03Z")

</div>

I have a flow that is a simple HTML page that allows one to select a file then submits it to another flow the second flow starts with an "HTTP Node In" then passes it to a "function node that makes a web service request (externally) does some processing and returns a result which I display in a subsequent HTML page using a "template node" (results page) and of course the last node in the second flow is an "HTTP response node"

This works perfectly if I use a basic HTML select form with a submit button on the first flow.

If however If I update the first flow and use an ajax submit to the "HTTP Node In" the second flow never displays the final results page. I see that I get the back proper results via a debug node. The actual results are identical in both cases but in the second case using Ajax I cannot get the results page "template node" to display. placing a debug node on each node on the second flow shows identical results for both cases. How can I force the "template node" (result page to display) replacing the file upload page of the first flow when doing an ajax submit.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [5 December 2019 08:39 UTC](https://discourse.nodered.org/t/flow-fails-to-load-result-page-after-ajax-form-submit/18809/2 "2019-12-05T08:39:31Z")

</div>

Have you set the debug to see the complete msg ? Are there other properties that may be missing ?

---

<div class="post-metadata">

**Author:** ![FriendlyDre](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FriendlyDre](https://discourse.nodered.org/u/FriendlyDre)\
**Post date:** [5 December 2019 15:01 UTC](https://discourse.nodered.org/t/flow-fails-to-load-result-page-after-ajax-form-submit/18809/3 "2019-12-05T15:01:23Z")

</div>

@dceejay  
Have you set the debug to see the complete msg ?

As I listed on my op "placing a debug node on each node on the second flow shows identical results for both cases" I even get the full msg object with the proper data after the "Template node" and before the "HTTP response node" yet the template node does not load. so I know that data is being passed to the "HTTP response" node but the original post form submit page is all I see.

Are there other properties that may be missing?  
it works perfectly with a standard form submit (no ajax submit function) on the first flow's page. also when I do a "msg.req.files" on the debug node the whole file is properly passed to the second flow after the "HTTP in" node.

Is there a standard way to programmatically force the template page to load and continue passing the msg.object? Maybe I can do this by placing another function node prior to the template node. Needless to say, this would be a programmatic hack and does not explain why using an ajax call to submit the form vs a simple form click does not redirect to the template page 3 nodes later on a separate flow.

---

<div class="post-metadata">

**Author:** ![FriendlyDre](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FriendlyDre](https://discourse.nodered.org/u/FriendlyDre)\
**Post date:** [5 December 2019 18:21 UTC](https://discourse.nodered.org/t/flow-fails-to-load-result-page-after-ajax-form-submit/18809/4 "2019-12-05T18:21:45Z")

</div>

@dceejay  
I found a similar flow online that exhibits the same behavior. This is a dropzone file upload and although mine is a bit more complex this one exhibits the identical problem. I added it to Pastebin not to spam this forum.

[Flow in Pastbin](https://pastebin.com/gMWASTxB)
