Skip to content

Tag: javascript

Can’t access Adonis from Docker Container

I use Docker to contain my Adonis app. The build was success but when I access the app, I got ERR_SOCKET_NOT_CONNECTED or ERR_CONNECTION_RESET. My docker compose contains adonis and database. Previously, I use the setup similar with this for my expressjs app, and it has no problem. The adonis .env is remain s…

Node.js response API vs. Express.js response API

Both, Node.js and Express.js have response API. And it looks like there is even some overlapping between them, e.g.: Node.js: response.write(chunk[, encoding][, callback]) Express.js: res.attachment([filename]) res.download(path [, filename] [, options] [, fn]) res.sendFile(path [, options] [, fn]) res.send([…

Javascript automatically calculating

I try to add 3 input text of type readonly automatically using javascript, each value of each text input changes automatically based on the input from the related one. But when all of the inputs are filled with values, the total input text has not changed at all, even though I’ve tried to put the onchan…

How do I change the date format?

This is my js function to fetch data from database. The data is being dynamically appended data to my modal popup from the js page. Currently the date format shown, is “2018-06-09 15:43:44″(as stored in database). I wish to change the date format that is being displayed to dd-MMM-YYYY. Is there a …

Get the value of a radio input button using jQuery

I’m trying to get the value of the radio button that has been clicked, and I’m using the code below. But I’m getting the following error: jquery-3.5.1.min.js:2 Uncaught TypeError: Cannot read property ‘toLowerCase’ of undefined The code that I have used: Answer The issue is that …