Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
53 views

Why is my AJAX request not working in Node.js and Express project?

I'm trying to make a request using ajax to my backend, but it always returns a 404 error, but my route exists. Project structure: public -scripts --script.js routes -chats.js views -chats.ejs index.js ...
Gomaink's user avatar
-1 votes
0 answers
30 views

My Quantity increase button is not enabling when i reduce my quantity from maximum. I am using ajax for increasing and decreasing quantity in my cart

$(document).ready(function() { function updateQuantity(variantId, newQuantity) { const basePrice = parseFloat($('#quantity-' + variantId).data('base-price')); //const totalPrice = ...
Nisha Mashhood's user avatar
0 votes
1 answer
60 views

nodejs using https to send res back to client

app.post("/weather", function(request,response) { let city = request.body.city; const options = { method: 'GET', hostname: 'open-weather13.p.rapidapi.com', ...
letsCode's user avatar
  • 2,866
0 votes
2 answers
419 views

How to get a local file via fetch/axios?

For study reasons I need to use some of these network APIs like fetch or axios but to get a LOCAL file, so WITHOUT using fs module, or WITHOUT importing them. I tried with both fetch and axios, but ...
allexj's user avatar
  • 11
1 vote
1 answer
63 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 ...
berkebayram's user avatar
0 votes
0 answers
31 views

ajax code for retriving data from db is correct still cant display the specific result which is searched for on the page

my project is a todo list website. in which I have added a search page where a task can be searched. task with day date time will be displayed, the code for that seems correct to my knowledge but it ...
zaz02's user avatar
  • 1
0 votes
0 answers
45 views

Application breaks when json file is requested

I have setup a simple express server that serves static files (React app build) like shown below: import express from 'express' import path from 'path' const app = express() app.use(express.json()) ...
howard wolowitz's user avatar
0 votes
2 answers
35 views

Jquery serialzed form datas are displayed as string on server side while sending using ajax

I wanted to send 3 objects to my server. 2 payment response objects and one object contains my form input field values. But if i send it together like i shown below, the formData is treated as string ...
Ahammed Zulaikh's user avatar
1 vote
0 answers
307 views

Nodejs ajax sync calls not working from 2024 january (Chrome)

Premise: I know that "sync" is evil and that nobody should use it. I don't expect answers like "don't use sync" or "rewrite it async". I already know! Thanks. I have a ...
Alex's user avatar
  • 11
0 votes
1 answer
64 views

NodeJs fetch with file to Golang API

I try to post via node-fetch to golang API files with some structure, I can make it from postman, but no way from NodeJS Hi there. im at dead end, i had tried everything... I need make a request to ...
Алексей Колесников's user avatar
0 votes
1 answer
21 views

How do I update multiple collections in a specific way when the user clicks a button?

I have two collections: test.matchhistories (for storing data of previous matches) test.userdbs (for storing data of players) I have a page called "live-tracking.ejs" Here is the table for ...
Yoshixed's user avatar
0 votes
0 answers
28 views

Undefined req.body Values When Sending Form Data via Ajax [duplicate]

I'm using Ajax to send form data to the server, but I'm encountering an issue where I'm getting undefined values when I try to access req.body.name on the server side. However, the file upload part is ...
Abdullah's user avatar
-1 votes
1 answer
53 views

Updating ejs template with AJAX request

I am creating a web app that returns recipes when a user searches for a specific ingredient(s). I am using the edamam api and decided to use pagination so that I could load more recipes relative to ...
Victoria's user avatar
0 votes
1 answer
271 views

req.body not working I can't receive data from POST with express in javascript

This is my first time building an express server in nodeJS, i don't know much of what im doing but i managed to make POSTs and GETs using routes and controllers... I don't know why req.body is showing ...
Flacuchentxox's user avatar
-1 votes
1 answer
48 views

Ajax 400 error after Express Validator runs server-side validation

I am trying to fix a form handler that always throws a 400 error after middleware validation. The middleware validation goes like this: const contactValidate = [ check('name') .exists() ....
Andrew Buccellato's user avatar

15 30 50 per page
1
2 3 4 5
205