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.

5,941 questions
0votes
1answer
17views

how to pass ejs variable to extern js script

i have a script on my html page like that: <script> let a = <%-JSON.stringify(tags)%> </script> now I need this variable on my main.js file. But I don't know how I can access it
0votes
1answer
12views

Click event triggered on one element but not on another

I need to toggle a section (called "newHexagon")'s visibility by alternatively clicking two different h2's, "seeHexagon" and "hideHexagon". When the page is loaded ...
0votes
0answers
11views

ExpressJS : SQLITE_RANGE: column index out of range WHERE condition

I am working on a project using express , EJS and SQLite , So i made a function that select data from the database, and render it to the interface, this is the function: function findHomeforSell(req , ...
0votes
0answers
15views

EJS does not see an existing view

Error: Failed to lookup view "home" in views directory Why the app can't see the view called home? The same folder that contains app.js file contains a folder called "views" with ...
-1votes
0answers
16views

How to use multiple scripts files in one ejs file?

###How to Add multiple script files into a ejs template file? I have tried to add multiple script file into a one ejs file. But at a time all script files do not work. Which is at the last of the ...
0votes
0answers
8views

When running a .ejs file I keep getting an error, is the error in my code or is it somewhere else in the program? how can I fix this?

I am trying to install a program on my Linux machine that runs like a website in my browser with a control panel, I followed multiple tutorials 1:1 so I doubt there are any mistakes, but when I run ...
-1votes
0answers
11views

REQ.BODY IN TEXT AREA [duplicate]

how are you? I have a problem. I'm using JavaScript, express and ejs. I have a textarea in my form and i want to put there the req.body. In my other inputs, I can do that because I have attribute ...
0votes
0answers
22views

img tag not displaying images when using with ejs

I'm working with express, ejs and mongoose . i have list of products in mongoDB and i want to display images of products which is store in my local storage. i used express.static method to access ...
-1votes
0answers
32views

How should I do to custom configure the EJS Template Engine

I am trying to configure the EJS template engine to customize some things, but it does not work for me, I have already done this procedure before with HANDLEBARS and it works perfectly, but now I need ...
0votes
1answer
21views

How to loop data imported from SQLite database

I am building an Express app ,and i am using SQLite database, I managed to fetch the data from the database, but I want to display it in the interface ,So i did this : index.js /* GET THE LIST OF ...
0votes
1answer
32views

why Ejs not being recognized by vscode [closed]

I have searching for solutions but nothing working. I installed ejs extention on vs code and also dependency. added *ejs and html in setting and tried several solution on StackOverFlow. The answer ...
1vote
0answers
12views

EJS for loop with Sqlite DB

I really need help for my project. I need to connect my databank with ejs and a for loop. My Code of the ejs-site: <% for (var i =0; i <=daten.length; i++ ) { %> <%=daten%> <% } %&...
0votes
0answers
16views

blog post edit from MongoDB does not save changes in NodeJS, ejs template for my blog

I am almost done with my blog site, but I cannot make changes on my edit form back to my mongodb. I have been looking at this for hours, but can't figure it out. app.put('/savePost/:postId', function(...
-1votes
2answers
44views

Why am I not getting the right answer?

I'm creating a blog using EJS and Node. After composing, Compose window screenshot I get a brief summary of what was written on the homepage, I also get a link which is supposed to send me to the post ...
1vote
2answers
19views

EJS : Adding styles to infinite to do items in a list by their id's

I am trying to add styles to To-do items on my web page using their id field. <body> <h1><%- dayType %></h1> <ul class="tasks"> <% for(i = 0 ; i < ...

153050per page