Having trouble extracting values

Few things confused me about extracting value from either html
links or html
form path and
module to the server,
For example:
1.suppose I create html like…

  <article id="my-article">
<p>do some stuff </p>
And at some point in the website I create a link ...
  <a href="#my-article">go here for more article </a>

 how do I extract the content of article ( value),the on the sever for manipulation. 

below is how am trying to extract the content but am not getting it right.

let express = require("express");
let app = express();
    let article = req.params.my-article

hope you understand the question thanks.

@route-chris You have some issues. Your article route is not returning anything. Also you are missing the colon character.
Your route should look something like this:

app.get('/post/:id', (request, response) => {
    const postId = request.params.id;
1 Like

Okay Brandon_wallace, I have stated that extracting values is the issue. I will appreciate if you show me the right way with example. Thank you.

Can you explain in detail exactly what it is you are trying to achieve? Why do you need the DOM content server-side and what is it you plan to do with it?

1 Like

Okay lasjorg, I intend to build up
a website which take input as items and add up. This website will also contains user name, password, radio button and also links to various
part,now I know that I have to put this website on the server so that I can connect it to network and configure the website. Am finding it hard to get those input and links so that I can configure it.I hope you understand me at least .

Remember query parameters and input parameters challenge. Some stuff like that. This could have been better on client side but I have to put it up direct on sever side.
Let me try to put it in the way we can both get it, cause I want you to get it and help me.
1.I want my website to be connected to the network
2. and I will like to use req.query.page or req.params.password, first,email to extract the user details and configure it.also give conditions on how to flow on the website.

thanks it work. I was thinking I should add you up on team if you don’t mind. I mean the website building team.

1 Like