Category "javascript"

How to close sidenav menu when click out of container div

I'm building a sidenav menu that appears and disappears when click a button. I learned a lot here about stacks, users have helped me up to this point, but now I

Elasticsearch Node.js delete does not work

I have the following function to remove document from index: async deleteDocument (indexName: string, id: string) { const indexExist = await this.isIndexExi

Direct url with hash value does not work with vue-router

Navigating to url: site.com/#locallink 'redirects' to site.com, first time entered in the browser - in other words, does not jump to the anchor. If I simply re-

How to know if the replaced tab for a previously discarded tab is the same?

So you discarded a tab and later when you click on the discarded tab , it reloads the page. First: OnUpdated() gets called with changeInfo.discarded === true

Creating cookie with a form values makes a null cookie

First of all, i need to create a cookie with a values that are in a form, and a lot of values are in a radio input type, but i ran into a problem with creating

Find position of all unique elements in array

let arrr = [7, 9, 30, 40, 50, 8, 1, 2, 3, 40, 90,2, 88,1]; output=[0, 1, 2, 3, 4, 5, 6, 7, 8 ,10, 12 ] I saved this code at javascript playgroun

Laravel Vue.js API: axios, FormData() is empty

I'm trying to update some data in Model using API in Laravel and Vue.js but I can't do this because FormData() is empty, I'm checking the data from formdata us

Im missing something, I need to display 9 cards, but I can only get 1 out

so I'm trying to display 9 jokes. I can only display 1 joke now, This is what it says on the console : Object { error: false, amount: 9, jokes: (9) […] }

Vector layer being drawn before the Openlayers map?

this is my code for the drawing const drawLines = () => { const points = [[-89.8802, 32.5804], [44.419834, -97.568073]]; const featureLine = new F

When Importing Self Made Vue 3 Library Into Vue 3 Project: "Uncaught TypeError: Cannot read properties of null (reading 'isCE')"

I created a custom component library using Vue 3, and after installing it locally thru yarn and registering the components, I kept getting the following error i

Is it good practice to use razor pages directives inside javascript <script> tags to pass model property values?

I'm developing a web app using asp.net core MVC and I've found my self using razor pages directives to pass model property values to javascript for further mani

Should we be using the unsubscribe method returned by Auth.onAuthStateChanged() in firebase to clean up memoery leaks?

Here is my code: import React, {useState, useRef, useEffect} from 'react'; import { getAuth, onAuthStateChanged } from 'firebase/auth'; import { useNavigate } f

jQuery Performance Long Running Tasks

var data = response.Data; var table = $('#' + tableId).dataTable(); table.fnClearTable()

Dynamic Tabs content wont display simple data

Hi everyone i dont know what i am doing wrong the content in the tabs are not displaying the links menu works fine Just i dont know why the content is not loadi

Why would a standard top-of-file import to suddenly cause failing on `npm run build` but not on `npm run dev`?

The module in question requires this, which works for dev import { RRule, RRuleSet, rrulestr } from 'rrule' This results in the following error from npm run bu

Javascript doesn't run with both electron and canvas libraries installed

I'm trying to use electron and canvas in the same script, but it throws an error when I try. I've tried using canvas and electron separately with the same node

Script Google Sheets to generate Google Maps picture and paste it into a cell

I tried to take a code and adapt it to my needs but without success as I am new in script. This code allows to generate a google map with markers on several add

Change nested object with one function in react

I have this kind of object where I want to change the Ethereum value for example; const [reportData, setReportData] = useState({ nameOrganization: "test5",

Not able to push data to real time database with react native

I am using this code to push to a real time database with NodeJS and this is working fine import admin from "firebase-admin"; admin.initializeApp({ credenti

Mutation observer not being called when there's a change in Shadow Dom tree

i have a running extension where i use combination of mutation observer and tree walker to filter out text nodes and embed React component on that page where i