Category "javascript"

Multiples transformations matrix on SVG, get cursor point

This question is probably more related to math than svg itself. Inside a main svg, got multiples transformed svg, (from different events), by a viewBox attrib

Check if page creation date is within the last 7 days with Eleventy and Nunjucks?

I posted a few days ago about having a way to check for newly created posts, and I am making some headway in this but got a little stuck as shortcodes are still

How can I import firebase app as browser module import?

I am trying to import firebase app (8.0.2) on the client side without bundler. I downladed the firebase-app.js from the CDN and host it on my server. The goal i

How to set start day time to particular time in momentjs

I'm trying to set the start time of the day to a particular time. currently, in momentjs, I can get startOf day like this let now = moment() console.log('now'

Error "File is a commonJS module; it may be converted to an ES6 module. ts(80001)"

Developing javascript in vscode, I see this error on line const Koa = require("Koa");: File is a CommonJS module; it may be converted to an ES6 module. ts(8

How to return a promise with alertcontroller in ionic 4?

I am trying to convert this ionic 3 code into ionic 4 but I don't know how the promise works on ionic 4. I tried looking into the documentations and I can't fin

How to expose a class to the global scope with esbuild?

Update user @TKoL suggested defining a property in the window object. This produces the result I wanted to achieve, although I do not know if it is the correct

disable other buttons using e.target.id

I have ten expansion panels. on click of one button in one expansion panel I need to disable other buttons in other expansion panel but the problem is when I tr

How to merge components in VueJS

The Laravel framework and the laravel.mix compiler are used. There is one main component "dialog". <template> <transition-group enter-activ

How do I fetch and parse JSON data to Google Sheets Script?

EDIT*** Modified the question now that I have a proper source... I am trying to copy a communication log to Google Sheets and don't know enough about scripting

How to display list of questions fetched from database into HTML using Ajax and JavaScript?

I am working on school management system and using Spring Boot framework. I want to display all questions list when student click on start test button and would

How to get network response code (javascript)

I recently added a linkedin tag to my website for data tracking very similar to google tag or fb pixels. For me to know the tag is installed correctly, I would

Stuck at progressively migrate my website to Vue.js

I chose Vue.js over React and Angular, because it felt much more easier to migrate my existing website (old technologies, ASP.NET Razor Pages inside Visual Stud

Jest (unable to set unique href for window.parent.location.href)

I have in my code a check to see if a page is being loaded inside iframe. App.js if (window.location !== window.parent.location) { console.log('App is running

Star and Half Star Rating in Laravel

I want to display average product ratings in star. The values are displaying good but I want to show half star if the value is in float. My blade view: <div

TypeError: undefined is not an object (evaluating 'navigator.serviceWorker.addEventListener')

I want to use Firebase Cloud Messaging to send notifications to the users, but I am getting this error when I try to setup messageing: TypeError: undefined is

How to redirect to new page with Authorization Headers after login?

I have a login page. On click of login button, the details are sent to server and are validated. A token is received in return after successful validation. I ne

How to insert price based on checkbox checked

I have a form where I calculate the price based on the checkboxes checked. But I am having trouble as its not updating the final price correctly. I did some jQu

can't resolve module inside subdirectory typescript

The module arrayGenerator.ts lies inside a subfolder, it works fine for other modules(Array.ts) inside the parent folder. But when I add a new module Sorting.ts

Bottle.py | request.forms.get() returning NoneType using AJAX

I am trying to send javaScript information into a bottle.py server using AJAX. After trying nearly every solution I could find on stackOverflow, bottle docs, or