I am using nodejs and the framework express.js to realize my website.
I am submitting a POST request on an url (/report/reportname) reportname is a variable.
so I do this :
app.post('/report/:id', function(req, res){
res.send("test");
}
and in my index.html I do : ( ID= a variable )
<form action='/report/ID' method='POST' target='FOO'></form>
<iframe name='FOO'></iframe>
When i click on submit it redirect me on the page /report/ID
and i see the word : test
and the iframe is not refreshed.
How can I do ? ( And I have to use res.send(something);
)
Thanks !