Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

How to connect HTML button to Express server delete route?

I have an Express server with a route for deleting a (psychology) experiment. (I have split my routes into multiple files. This route is in admin.js and thus its full route path is /admin/experiments/:...
America Holloway's user avatar
-1 votes
0 answers
22 views

Getting errros on js script tag on a ejs page [closed]

let glassRestrictions = <%- JSON.stringify(windowSystem.glassRestrictions.map(glass => ({ type: glass.type, width: glass.width, height: glass.height, positivePressure: glass....
Camilo Mejia's user avatar
-1 votes
1 answer
26 views

How do I display loading screen while EJS is rendering content

I'm making website using NodeJS, Express JS and EJS. In some pages, they need to execute lots of database queries and it should take long time. I want to display loading screen during this time, ...
KaizOffical's user avatar
-4 votes
0 answers
32 views

EJS loops not rendering html tags

I am a beginner in coding using JS, NODE, and EJS. I used fs.readdir to get some files as an array then to loop it and display filenames as an html list tag. I can see my files using console log. ...
Mplbaltazar's user avatar
0 votes
0 answers
12 views

Issues with EJS path resolution after deployment to Vercel

I'm encountering a path resolution issue with my EJS templates after deploying my Express.js application to Vercel. The application works perfectly in my local environment, but after deploying, I'm ...
DeyPlay's user avatar
0 votes
0 answers
27 views

How to debug CSS design issues persisting **only** on production?

I Have a Node.js based url shortening GitHub project deployed on vercel and Its been a while I've been facing a discrepancy in the CSS design e.g: HTML table and body elements on the Pixel 7 device ...
Sarkis's user avatar
  • 95
-3 votes
0 answers
43 views

How to inline JavaScript when coding in nodejs 'views' [closed]

I've been using nodejs as my backend. In nodejs you use 'views' as the frontend instead of html files. Views are very similar to html files, but I was wondering if there is a way to code javascript ...
Nisitha Kaveen's user avatar
-2 votes
1 answer
48 views

How to fetch data from my mongodb database to my frontend [closed]

Please, I'm a beginner and I'm trying to run a blog site using Node... I've been trying to write a code to fetch data from my MongoDB database to my frontend using nodejs, express, ejs and mongoose ...
Destiny Chinda's user avatar
0 votes
0 answers
24 views

Why is my express.render() not doing anything after building?

I have an express server inside my electron-forge app that is supposed to return an ejs template filled out with my users' information. When I call it in development (npm start) it returns as I would ...
Toon Cuyvers's user avatar
0 votes
0 answers
26 views

Puppeteer Not Generating PDF in Azure production Enviroment [closed]

i'm wokring on medical Application in which i am generating dynamic pdf using ejs template engine. I'm using puppeteer to generate medication chart pdf. puppeteer is generating pdf in local enviroment ...
Usama Riaz's user avatar
0 votes
2 answers
42 views

Rendering user.ejs file into dashbord.ejs file but user.ejs file's javascript is not working after rendering it in dashbord.ejs

I am making a web based chat app like whatsapp web. When clicking on an user then I want to render user.ejs file inside dashbord.ejs. I am able to load the html and css from user.ejs but js is not ...
Basant Namdev's user avatar
0 votes
0 answers
52 views

Rendering and sending data to EJS template

I am a newbie NodeJS developer and I am trying to fetch data from MongoDB and render it to another .ejs file to display it. But error showing that data is not defined in the line <% data.forEach(...
Abir Rahman's user avatar
0 votes
1 answer
31 views

How to link my JS file from a different directory to my EJS file

I have an ejs file in the following directory: ./admin/admin.ejs and i have plain old JS file in the following directory: ./public/client.js and an express app in the following directory: ./app.js ...
Isaac Del Castillo's user avatar
0 votes
0 answers
14 views

i want to make grapejs editor demo on my admin dashboard newPage.ejs

here's my source code for newPage.ejs : im using express nodejs.On demo there are like 30 buttons like column1 column2 but i only see 3 buttons link block - quote - text section. i want them all. do ...
Tuğra Güler's user avatar
-1 votes
1 answer
20 views

Linking a button to a part of a web page from an ejs partials(nav)

I am unable to link a button on my nav bar in an ejs template to a part of one of my web pages I have been trying to link a button in my nav bar to a part of my webpage, there are different web pages ...
owoeye samuel's user avatar
0 votes
1 answer
35 views

how to render a specific piece of data from Mysql database to my front end html using Js and node

so i am building a note system and how i have it setup is that on the home page it gives you a preview of the note and if you want to see the whole note you click on it and it pulls up a modal pop-up ...
Treemo's user avatar
  • 1
0 votes
0 answers
21 views

API calls don't work after installing TailwindCSS

I just finished a perfectly working 'Google Drive' clone as a personal project. It uses cloudinary API and Prisma ORM. Everything worked perfectly fine until I decided to install TailwindCSS and now ...
Nols's user avatar
  • 1
1 vote
1 answer
90 views

Why is req.body empty when posting form in quiz.ejs

app.js const express = require('express'); const mongoose = require('mongoose'); const path=require('path'); const app = express(); // Connect to MongoDB async function main(){ await mongoose....
Aayush Puri's user avatar
0 votes
1 answer
24 views

facing issue while uploading project it on render

enter image description here this is my rander log screen //navbar.ejs <% if(!currentUser) {%> <a class="nav-link" href="/signup"><b>Sign Up</b&...
Parth Jadeja's user avatar
1 vote
1 answer
68 views

EJS isn't being rendered

I'm making a rock, scissors, paper game on the backend of Node.js with express server, frontend.js client-side, index.ejs and main.css files. I firstly want to render a string line of the result of ...
Yuval Yanay's user avatar
-1 votes
1 answer
67 views

css doesn't apply on a page but apply to others

I'm following a course and I'm building this web site where I'm using ejs . I'm encountering 2 problems, first this page doesn't show and keeps loading until I stop the loading Second when it loads ...
amar chellihi's user avatar
1 vote
0 answers
42 views

Cannot get data with Mongoose .populate()

Listing schema : const listingSchema = new Schema({ title : { type :String, required : true, }, description : String, image : { type : String, default : ...
Priya 's user avatar
  • 11
1 vote
1 answer
33 views

How to Ensure that Clicks on <li> Element in Nav Bar Correctly Redirect Authenticated Users to the Dashboard Page?

I'm experiencing an issue with my web application where clicking on an account icon behaves inconsistently. When I click near the edge of the account icon, it correctly redirects to the dashboard page....
BrainDebugger's user avatar
0 votes
2 answers
69 views

How to implement this npm library with javascript and NodeJS

I'm getting back into internet programming after taking a class on it a few years ago and I'm trying to implement a library into my website. For this project, I want to use these animated diagrams of ...
Octavia's user avatar
  • 11
0 votes
0 answers
41 views

want to create an archived section based on the expiry date

There are couple of listings and they have an end date set with them . I actually wanted to create a seperate route for the archived section, so basically whichever listing crosses the end date they ...
khonshu's user avatar
  • 21
0 votes
2 answers
51 views

How to print data from a form as a list item?

I’m trying to make this post feature where the user can enter a number of names, and each name will be printed as a list item in ascending order like this: Bruce Wayne Peter Parker Clark Kent I've ...
Abdul-Jalil's user avatar
0 votes
0 answers
109 views

MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017

I'm having problem using mongodb. I downloaded as said in docs for debian (i'm using kali linux) and first day it was fine. Everything i did worked well. Now for second boot up it started giving me ...
Lobiani1's user avatar
0 votes
1 answer
95 views

How do I create charts on my javascript website using data from mySQL database. Using EJS front-end

I am making a website where I can enter data for golf course greens, and then analyze it. I am using express in my backend to route to my ejs pages. I am also using a mySQL database to store the data. ...
Ben Northridge's user avatar
0 votes
1 answer
37 views

How to create a item in the Todo list

When you make a new item on the todo list it makes a new row but when you make a second one instead of making a new item on the todo list it changes the previous one. How would you go around making a ...
TroglodyteTerry's user avatar
0 votes
0 answers
73 views

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at (CORS request did not succeed). Status code: (null)

I want to deploy my node.js on vps. my project tech stack is node.js , express , peer.js and socket.io I deployed the project on server but cors blocked error occurs Picture of the error is I am ...
Syed Talal Jilani's user avatar
0 votes
0 answers
23 views

If i try to set src of an img variable that is not a valid url in ejs template, it throws an error [duplicate]

This is the code to fetch data from mongodb and then send it to ejs template to render. the data object is fetched correctly, I checked by console.log the data object,and there are no validators set ...
Rajneesh Bansal's user avatar
-2 votes
1 answer
47 views

Node js ejs variable not define issue

i am mern stack developer and i don't have any experience in this field. I have tried all method to solve the below problem but it gives error my template file is <!DOCTYPE html> <html lang=&...
GAMING WARRIOR's user avatar
0 votes
1 answer
28 views

Error while trying to create variables for title and price through Stripe embedded checkout

I keep getting the error, Stripe error :"You must specify either product or product_data when creating a price". I'm a bit lost in how to fix this issue and would very much appreciate some ...
Failenn _'s user avatar
1 vote
1 answer
59 views

How to Include EJS Template Files in a Node.js Executable

I'm developing a Node.js web application using Express and EJS as the view engine. My goal is to create a single executable file that I can run on my webserver without needing to copy any additional ...
green1111's user avatar
  • 221
0 votes
1 answer
29 views

trix autofocus issue on expreessJS/ejs

I'm building a blog, with NodeJS/Express, and use Trix editor to handle writing and editing the blog posts. while attempting to edit a post trix rich text area automatically fouces; not allowing any ...
Kenan's user avatar
  • 23
2 votes
1 answer
48 views

EJS Rendering Error: "allChats is not defined" Despite Data in MongoDB

I'm working on a messaging application using Node.js, Express, MongoDB, and EJS. The goal is to retrieve chat messages from MongoDB and render them using EJS. However, I'm encountering an issue where ...
Shreyans Jain's user avatar
0 votes
0 answers
31 views

Details ejs not working after database query

I have a context in node.js called Blog which displays the blogs which users have inputed to the database on one webpage. I then have a method which after a user clicks on the blog then tries to ...
Russell Flaherty's user avatar
0 votes
0 answers
43 views

Session storage key value returns undefined even though it's set

Inside my products.ejs file in script I set key value to the current path. In my main indexjs file, in POST method to /login I try to access that path and use it to redirect to it after successful log ...
Boban Banjevic's user avatar
-1 votes
1 answer
47 views

Socket.io , CSS and UUID aren't working together?

I'm developing a project for real-time communication. I believe there is an issue with my server.js file that I was unable to decipher I therefore programmed it to use the uuid library to create a ...
Titan's user avatar
  • 3
0 votes
1 answer
34 views

Weird Javascript behaviour, when combined with ejs Objects

I am currently working on a small account system and I would like to display the user data in an overview webpanel. The user object is passed through directly with the ejs file to the client after ...
Paul's user avatar
  • 3
1 vote
1 answer
54 views

How pass Mongo collection to EJS template and then create select tag with customizable options

For a cookbook, I create a new recipe. Within that recipe, I enter the recipe name, the instructions, and then have an input field for the number of ingredients. When you enter a number, you clicked ...
padcoding's user avatar
0 votes
1 answer
57 views

Flash message not displaying after logging out

Log out route router.get('/logout', (req, res) => { delete req.session.returnTo; req.flash('success', 'Successfully Logged Out!'); req.session.destroy(); res.redirect('/home'); }) Route ...
Fatima sami's user avatar
0 votes
0 answers
30 views

SyntaxError: Invalid token when using an exclamation point within an EJS output tag

<body> <h1>Home Page</h1> <ul> <li>Name: <%= restaurant.name %></li> <li>Address: <%= restaurant.address %>...
padcoding's user avatar
0 votes
1 answer
41 views

Images are not loading in ejs file

When the request is made on /blog images are loaded in EJS file rendering to blog.ejs, but when the request is made on /blog/comment/add/:blogId the viewComment.ejs file loads but images don't. I have ...
jainyashit's user avatar
0 votes
1 answer
42 views

Can't push index.ejs file to git hub

I have tried to use "git add ." to add and commit file, but folder "views" is not added. [the folder is include index.ejs, header.ejs and footer.ejs files.] I have tried to cd at ...
user25409519's user avatar
1 vote
1 answer
40 views

Image in header tag is not showing in my EJS template

I'm creating a code which consists a form but the image in the header is not showing/popping up this is my current code as of now const express = require('express'); const bodyParser = require('body-...
Juan Miguel Ramos's user avatar
1 vote
1 answer
40 views

Is there a way to make a POST request for multiple variables?

I'm creating a Blog website as a Capstone Project and I'm trying to get this form to print 3 different variables when I click the submit button, but when I tested the code out, all it does is make the ...
Abdul-Jalil's user avatar
1 vote
1 answer
46 views

error in rendering a RESTful comments in ejs

when working with ejs and render a file of comments contains username and comment it only renders the username and the comments is not rendering at all index of comments const comments = [ { ...
Mena Makrem's user avatar
0 votes
1 answer
30 views

Reference error on register.ejs "loggedIn" is not defined, but its defined in the index.js file

The index.js file has loggedIn rendered as a variable for the ejs file but it keeps telling me its not defined: <ul class="flex items-center p-1 grow justify-end"> ...
Omar M's user avatar
  • 19
0 votes
0 answers
23 views

Problem with jump link have to much info when click on button in "form" class

<div class="input2"> <form action="/browse/room" method="GET"> <input type="text" name="search" class="search2" ...
Vũ Nhật Quang's user avatar

1
2 3 4 5
131