Questions tagged [ejs]

"E" is for "embedded." EJS is a simple templating language that lets you generate HTML markup with plain JavaScript. No religiousness about how to organize things. No reinvention of iteration and control-flow. It's just plain JavaScript.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Not able to get the desired output in javascript and ejs

I am trying to make a todo application using js, express and ejs but I am not able to get the desired output. enter image description here This is the code I wrote and this is the output. enter image ...
Abhishek Garg's user avatar
-1 votes
0 answers
27 views

I'm creating a To Do List application using Node, express and EJS. When a button is clicked, HTML code should be added

I'm trying to add this piece of code to my EJS whenever a button is clicked. <div> <input type="checkbox" class="checkBox"> <input type=&...
Software Engineer's user avatar
0 votes
0 answers
14 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
22 views

Seeking Guidance on Error Handling and Routing

I would like to request a review of my app.js file (Clone Project Bootcamp) to ensure that I have implemented error handling correctly. Below is the relevant portion of my app.js code: const express = ...
Miriam Sparbrod's user avatar
0 votes
1 answer
23 views

Having trouble using push on object into my Topic array

I'm working on a forum. Here is my Topic schema const topicSchema = new mongoose.Schema({ author: { type: String, ref: "User", // Reference to the user who made the Topic update ...
Dagger's user avatar
  • 307
-3 votes
0 answers
19 views

How can I alert a sql query result in AJAX and NodeJS

I want to fetch the Color1SStock column from my MYSQL server and alert it with a Javascript alert. ChatGPT wrote the code inside of the script tag in the file Product-Display.ejs . I want the system ...
CookieMonster's user avatar
1 vote
1 answer
35 views

How can we do late execution of an html code

I want the part of the html code to only execute when the above form is being submitted. <body> <form action="/Recipes" method="post"> <input type="...
Abhishek Prasad's user avatar
0 votes
1 answer
20 views

Resolving 404 Errors for Font and Image Files in Express.js Application

I'm encountering 404 errors when trying to load font and image files in my Express.js application. I have tried various approaches, including using a tag in my HTML, but some assets are still not ...
Erblin Krasniqi's user avatar
1 vote
1 answer
27 views

Google Drive API problem connecting with NodeJS

I am trying to create a gallery page in my NodeJS app. However, there it seems like something isn't working with the connection. The idea is to get all photos from a Google Drive folder that is public....
Kristiyan's user avatar
0 votes
0 answers
10 views

Using EJS to display relative off-canvas

I have three off-canvases with multiple functionalities in a single page. Specifically, in all routes. I was trying to hide them all until the relative components being toggling. Even though the ...
Stanford's user avatar
0 votes
0 answers
11 views

Hosting webapp made with nodejs view engine

I have created a webapp which is rendering its page using view engine. All the .ejs files containing html codes are lying inside the views folder. And all the functionalities used to render/redirect/...
Swapnil Pranta's user avatar
0 votes
0 answers
19 views

How to call Express variable after page load/an event and not before?

I recently started my first frontend project at my place of work. Basically, it's a map of our office with clickable and popup windows with info about user (who sits at this particular desk) from ...
ElCrapachino's user avatar
0 votes
0 answers
13 views

How can I view a topic in a forum after submitting it?

I'm setting up a forum but I'm stuck at being able to actually view and respond to the topic. I have a form set up on my index page that allows me to create a topic and save it to a database. It saves ...
Dagger's user avatar
  • 307
0 votes
1 answer
21 views

Having trouble removing comma from toLocaleDateString

I have a forum and I'm trying to display the date on topics like this: 9/21 2:09 AM I've got it mostly working but there's a comma after the month/day so it ends up looking like this : 9/21, 2:09 AM. ...
Dagger's user avatar
  • 307
0 votes
2 answers
39 views

how do I add the functionality to strike through the content in my To-Do-List?

I am creating a To-Do-List, using express and ejs. I want to add functionality in my To-Do-List that when I check the checkbox, I want that particular content striked-through. Firstly, I tried ...
Araib Irfan's user avatar
0 votes
0 answers
38 views

Creating unique session for each user

Im currently working on a todo/tasks web app using node and express, im having a hard time to create a unique session for every user and storing the tasks for each user accordingly, for now i am ...
Ali's user avatar
  • 1
0 votes
0 answers
37 views

How can I use ejs in my node application?

My folder structure: ├── routes │ ├── userRoutes.js │ └── authRoutes.js ├── views │ └── index.ejs └── index.js The index.js file: import express from "express"; import morgan from &...
Dhyan Rai's user avatar
0 votes
2 answers
47 views

Got empty String when passing the "_id" from mongoose

I am creating a to-do list app, using node js, express, and mongoose. now I am trying the delete item function, using a checkbox from a form to pass the item._id to the express, My data type for to-...
afterlifexx's user avatar
-1 votes
1 answer
42 views

Doesn't underline when checkbox is checked

Basically, I'm trying to create a Todolist app by express.js and node.js that every time that a user checks a particular checkbox of a task, it'll be underlined this particular piece of data inside ...
Yuval Yanay's user avatar
0 votes
0 answers
19 views

How to Host Node.js with EJS Templates on CentOS 7 with Reverse Proxy Using Apache

I am currently facing an issue with my Node.js application using EJS (Embedded JavaScript templates) on CentOS 7. Whenever I attempt to change the route, I am redirected to the EJS error page. Even if ...
Ankit Kumar's user avatar
0 votes
1 answer
23 views

Displaying conditional content from MondoDB to a list element, according to an option value selected by a user

I am trying to conditionally display documents from MongoDB on a webpage. The user should select an option from a select element and that will filter the documents accordingly. If the user selects the ...
Alpha-Sanz's user avatar
0 votes
0 answers
15 views

JHipster Generator Customizations (IDE config)

I want to make some frontend changes to the JHipster Generator v7.9.3. Actually I have already made some changes in the entity-client subgenerator. For example, in generators\entity-client\templates\...
Kleinstein11's user avatar
0 votes
0 answers
14 views

GraalVM EJS Fetching Include from a database?

was hoping someone can help me understand how I can override or use client:true callback function to fetch the include from database. To give context, we are using Kotlin and GraalVM to run its ...
Kyle Cribbs's user avatar
0 votes
1 answer
27 views

How to Display name from login show to other pages

I have to take the name. of users who have logged in to display on my ejs page. I can do it on the admin page, but if I can't do the same on the user page, an error occurs. I don't understand why. And ...
Nineny Socute's user avatar
0 votes
0 answers
40 views

I receive the error message "pwEntries is not defined" in my node.js mongodb project

I'm receiving this error message: 25| 26| `<div class="divTableRow">` 27| <% pwEntries.forEach(pwEntry => { %> ...
flexbeatz's user avatar
0 votes
1 answer
27 views

How do I add ejs to a src object of an image?

EJS Code: <img class="card-img-top" alt="..."><%= articles.image %><img> Server.js: const express = require('express') const app = express() const router = ...
voxador25's user avatar
2 votes
1 answer
38 views

ERROR: TypeError: Cannot read properties of undefined (reading 'username')

This is my whole code. I am trying to locate on my page.ejs page through /insta/:id but it is showing the error: Cannot read properties of undefined (reading 'username'). I want to get id that uuidv4()...
user22524515's user avatar
0 votes
0 answers
23 views

Electron using EJS

In my Electron app, I want to open my .ejs view when I click the button. So I try to implement the same logic as nodejs an did this ; document.getElementById('goto-exitW-button').addEventListener('...
MrB's user avatar
  • 5
0 votes
0 answers
39 views

Change the value of column on selecting dropdown option from other column ejs-grid inline editing

<e-column field="itemName" headerText="{{ 'itemName' | translate }}" [filter]="filter" clipMode="EllipsisWithTooltip" width="20%" editType="...
Mahadev Bansode's user avatar
0 votes
0 answers
24 views

in my local host checkcbox working properly but in dev check box is shrinked and it is not working

in my local host while converting ejs to pdf checkcbox style was correct but in dev check box is shrinked and it is not showing the checked are not checked while converting ejs file to pdf how to fix ...
HARI KRISHNAN's user avatar
1 vote
1 answer
31 views

Passing a variable through multiple levels of partials with EJS

I'm trying to figure out how pass a variable through multiple levels of partials with EJS. At the top-level, I have a page of my form. I'm trying to define a % completion to pass back to the progress ...
agrant2711's user avatar
1 vote
1 answer
33 views

How to make the delete button work in ejs

I am not sure what is wrong with my code. I am new to express. app.js list.ejs I thought I misspelled a variable, but I am unsure what I did wrong. I am making a todo list project using express and ...
Mary Gouge's user avatar
0 votes
1 answer
18 views

Internal Server Error (500) Firebase hosting (Failed to lookup view)

System: node.js: v18.17.0 npm: v9.8.1 firebase: v12.4.6 OS: Windows 11 Github repository: https://github.com/yanivavraham1/cuponim1 Problem Description: I'm a starting web developer and trying to ...
Yaniv Avraham's user avatar
2 votes
1 answer
81 views

Displaying a message on screen after being redirected to index

I have a main index page which displays 18 divs, each div representing a book. When you click on the div, you can find out various things about the book. The title, author, summary, etc. There's also ...
Dagger's user avatar
  • 307
0 votes
0 answers
26 views

How come my Edit Reply function isn't working properly

I have an edit function for the forum project that I am doing, but whenever I click on it, I was given an error. The error seems to be in my editReply.ejs file, which currently has these code: &...
iconwontload's user avatar
-1 votes
1 answer
34 views

How to pass/send a token from frontend to backend (using href?) for NodeJS verify if the EJS should render the page or not?

I'm creating a NodeJS application and I using a MVC pattern: > src >> [models] >> [controllers] >> [views] > app.js > router.js > server.js At the same repository, I ...
D. Watson's user avatar
  • 253
-1 votes
1 answer
28 views

I am trying to update my simple to do list when an item from the list is deleted, but the page does not update even though I render the index.ejs

What I am trying to do I am making a basic to do list with expressjs as backend I am using ejs js to check when a user clicks on a task I then use ajax to post this to the back end with the item to ...
Ahmed Kehinde's user avatar
0 votes
0 answers
19 views

I'm having trouble setting up a Remove from Library button which removes an object from a database

Sorry if this is a bit scrambled. I've stayed up all night working on this. I've been trying to come up with a Remove from Library button in the Library App I've been working on, which basically just ...
Dagger's user avatar
  • 307
0 votes
0 answers
23 views

CSS properties is not working in html-pdf library

donationReceipt = async (req) => { try { const { id } = req.query; let donationReceipt = await TblmanualDonation.findOne({ where: { id : id }, include: { ...
Lokendra Kumar's user avatar
0 votes
0 answers
9 views

Referencing error with a variable when trying to render an EJS file to display a table of information from mySQL database

Very new to everything so might be a silly query but I receive this error when I try to click on a webpage that should show a table of data from my mysql database but I receive this error: ...
Siku's user avatar
  • 1
0 votes
1 answer
35 views

I am getting error while parsing JSON data in ejs template

Syntax Error: Unexpected token ')' in pages\data ejs while compiling ejs. I am fetching jsonData which has two fields question and answer from a JSON file and applying a if condition to remove any ...
Divyansh Joshi's user avatar
0 votes
1 answer
44 views

Why is res.render not working after post request?

I've been trying to fix this for a while now. The problem is actually when I send a post request via the fetch api and then catch it with the post request in the node js file it should normally render ...
the lenny dragon's user avatar
0 votes
1 answer
55 views

Authentication and URL-shortener Node js app problems

The provided code contains 2 separate applications. What I'm trying to do is build an app where the login page is first loaded when the app runs, and then upon successful authentication, it redirects ...
moonstar's user avatar
0 votes
0 answers
8 views

Hyperlink image in css in express-ejs

I have the following code: const express = require('express') const path = require('path'); const app = express() const port = 3000 const ejs = require('ejs'); app.set('view engine', 'ejs'); app.use(...
Vishal's user avatar
  • 115
1 vote
1 answer
58 views

TypeError: Cannot read properties of undefined (reading 'split') when submitting form

I'm making a register page for a special type of user and the form has a input type file, which is the user profile pic, but it seems like the file is not sent to the server-side when the form is ...
Hjaeter's user avatar
  • 31
-2 votes
2 answers
47 views

res.render() doesn't render right

I'm making a MERN app for the first time but this res.render() doesn't render right. const express = require('express') const bodyParser = require('body-parser') const MongoClient = require('mongodb')...
Abdhul Basith's user avatar
0 votes
0 answers
12 views

i cound not find the solution of inline style condition

Please help me, I could not find the solution of inline style and if this is not possible then tell me the alternative to render dynamic property change in style. The snippet is find from below like, ...
santraj yadav's user avatar
1 vote
2 answers
38 views

How can I get the ID of a character inside an object

I have an array of movies and inside each movie is another array for characters. When I click on a character I'd like to show various bits of information about them (name, age, etc.) and in order to ...
Dagger's user avatar
  • 307
1 vote
0 answers
31 views

To-Do List | Node, EJS, jQuery | Node can't match the name attribute

I work on a classic study project : the To-Do List with Node, EJS, jQuery. I'm adding this functionality : when you tick the checkbox, the next time you submit to create a new task, the checked tasks ...
Sam's user avatar
  • 11
0 votes
0 answers
35 views

How can I delete the specific list element I clicked on the Delete submit in EJS

I'm developing a project with EJS for the first time. In the project, I get an incorrect result: What I want is to be able to select the list elements one by one and delete them with delete. ...
zehranurkok's user avatar

1
2 3 4 5
129