All Questions
194
questions
1
vote
1
answer
64
views
How to pass data by using an AJAX request to app.post() method in Express?
I develop a blog application using express and node, and I need to pass an array of keywords to the app.post() method to save a blog post (no database is used, an array holds these blog posts) with ...
2
votes
1
answer
82
views
I can't figure out how to make an AJAX request
I want that when the "Send to DB" button is clicked, the data from the form is sent to the database and output in the form. A new row of an existing table.
I have a table,under which is a ...
0
votes
0
answers
36
views
JavaScript does not work after using Fetch API to change the HTML [duplicate]
My "interact.html" just has Login form and two buttons, which called "Login" and "Register" respectively, if users want to create a new account, they need to click the ...
-1
votes
1
answer
46
views
How can I use multiple buttons for AJAX Calls?
<div class="form-group">
<div >
<a href="/addcourse">
<button class="btn btn-primary ">add course</button&...
0
votes
0
answers
81
views
Getting undefined value when sending data to server side
index.html:
//display the searched laptop
function searchProducts(){
let search = document.getElementById("laptopSearched").value;
console.log("Search_Value " + search);
...
0
votes
1
answer
50
views
Post request fires instantly when page loads
I have a simple one page website, where i have an email contact-form. My goal is to send an email to my account, when user fills the form and submits it. However, it doesn't work, cause POST request ...
0
votes
0
answers
115
views
Ajax : POST-method not allowed 405
I am experimenting with POST-requests in node.js and html.
Every time I am trying to post something, i get the error "POST http://IP:PORT/request 405 (Method Not Allowed)".
This happens no ...
0
votes
1
answer
105
views
How to send HTML document element to server in Node JS from client?
I am trying catch a snap of my client side document object and send it across to the node js server.
But when I try to stringify the
JSON.stringify(document.documentElement)
I am not able to do so. ...
2
votes
2
answers
598
views
Appending fetched json data to a div
I have tried to create a client side function that sends a fetch request for json data and then appends the response to a div however it doesnt seem to be working.
here is the client side function ...
0
votes
0
answers
36
views
I'm trying to perform a calculation, return the result and render it in the same page in node.js can't figure out the last part
So I'm trying to perform a calculation on node js and then render the result in in the main HTML but I can't figure out how. Everything else is working and done I'm just missing the last part. Any ...
0
votes
0
answers
32
views
Can't get search results ajax, html
So what i am trying to do here is searching users by their id, but the code isnt working, it says id_needle is undefined which I'm not sure why, did I do something wrong here? Please help look through ...
0
votes
1
answer
313
views
How to show userdata from a mongodb database on a page, edit the data and save again
I have a site where you can register as user and log in. Now i am trying to make a profile page where you can change your username, email and password.
I can only get the data from the first user from ...
-1
votes
1
answer
517
views
How to redirect user to different web page using Express.js? (Yes, I have tried using the `redirect` method) [duplicate]
I am creating a simple web application with no front-end framework (other than jQuery) with an Express.js backend. I am trying to redirect the user to a different page once a registration form is ...
0
votes
1
answer
87
views
Retrieving Mongodb data in front end by using Ajax Get Method
I have inserted a data in mongodb and used nodejs for writting API, need to retrieve those data in front-end using jquery. I have inserted 3 rows of data in mongodb.I have used below code to get data ...
-1
votes
1
answer
20
views
Pass AJAX param and access it from expressjs side of application
I feel like I am missing something here.
To start, you have an AJAX call you can do in tag to post data to the backend, which looks something like,
function changeDom(){
console.log('...