How I can find data of app.post in jQuery?

235
January 07, 2018, at 9:52 PM

I need to get req.body.categories value in one html file with jQuery!

app.post('/admin/statistics/result',function(req,res,next){
res.sendFile(process.cwd()+'/client/admin/statistics.html');
});

and in statistics.html I want req.body.categories value. And I should tell you there isn't any form I send data with request package:

request.post({url: 'http://127.0.0.1:8080/admin/statistics/result',
form: 
{categories: cat,data: data}}, function(err,httpResponse,body){
  if (err) throw err;
  res.send(body);
});

what should I do?

READ ALSO
Jquery , Ajax , spring MVC

Jquery , Ajax , spring MVC

I have one JSP pageIn this JSP page I have two dropdown and table

281
jQuery each(); generating html elements returns only last value

jQuery each(); generating html elements returns only last value

I am trying to dynamically populate HTML from XML dataI need only certain values

212
Move element on page as user scrolls up and down

Move element on page as user scrolls up and down

I am struggling to achieve what should be a simple task

229
Does Cytoscape.js have capability to add image to a node?

Does Cytoscape.js have capability to add image to a node?

I was searching for a javascript component to able me draw network topology using JQuery and found Cytoscapejs

233