Category "javascript"

Disabling Ctrl+T in web browsers

I'm stuck with a shortcut problem. Javascript is not a language I've used much, and the answers I've searched didn't help. I'm creating some tutorials for a spe

Gender radio input and fields of interest checkbox undefined in alerts

Can anyone help me why the gender and fields of interest output are undefined? I can't seem to get it no matter how I get the value and its getting out of hand

Add Button to Modebar to display in Fullscreen (Plotly JS)

I would like to add a custom button to the plotly graph to make the graph full screen. I have seen some solutions for the programming language 'R' but I did not

Schema for saving a lot of questions MongoDb

If I have a survey application for child tracking what is the best way to save survey questions in MongoDB? Knowing that survey is divided into stages (about 12

What are my options to deal with this stale closure in React besides using ref

I'm using the library React Datasheet Grid, the main component has a property called OnActiveCellChange, to which i'm passing my custom function: const [selecte

How to use the visibilitychange event to display messages when tab is hidden?

When an customer opens a new tab or goes away from the current sites tab, I'm trying to insert an promo message in the tab of a browser that flashes back and fo

How to add random minutes like first slots should be 30 minutes and then 1 of 15 minute slot and again 30 minute slot

const eventClick = (args) => { let StartTime = moment(args?.event?.StartTime, 'HH:mm ') let EndTime = moment(args?.event?.EndTime, 'HH:mm ') if (

mocking database calls in api routes

I am building a full stack application with NextJS and a MySQL database.In my API routes I make calls to this database (for example, createOne() for creating an

use ck editor in dark mode. works perfectly in light mode

I am beginner in vue and i want to use ck editor in dark mode it works perfectly in light mode but i am not able to make it in dark mode. documentation link fro

How to make Categories button functional

I got my current website displaying hard coded data from my data.js file. I implemented firebase as my database and I want to have my categories button work wit

Construct signatures with JSDoc and TS-Pragma ts(2351)

I've a function that returns a constructor dynamically. When I try to instantiate the new object it warns me This expression is not constructable. Type 'myConst

Insert tab character into SlateJS text editor

How to insert tab characters into SlateJS? So inserting   is a tab character, however, when inserting this as text, it appears as the literal character

Plucking specific substring from string - Javascript

I have a dynamic string that is generated like one of the following: var q = "FROM Table SELECT avg(1), avg(2), avg(3) where x='y' var q = "SELECT avg(1), avg(2

array.slice strange behaviour with nuxt-edge

EDIT AND SOLVED: I've found the origin of the problem: I thought arr.slice returned the new array but, actually, it returns the deleted element. See the documen

Show different image on different language Gtraslate

I use this java and find Gtranslate languege cookie (googtrans) <script type="text/javascript"> // Original JavaScript code by Chirp Internet: chirpintern

why ejs displays file.forEach is not a function

I have the following error TypeError: C:\Users\USER PC\Documents\Prime_News_Hub\views\Top_Stories.ejs:27 25| 26| <% if(file){ %>

intersection oberserver used with a loop through all the elements ends in error

I want to show some cards on scroll and for that purpose I chose to use an intersection observer. But I ended up with: Uncaught TypeError: Failed to execute 'o

State lost value in bootstrap table

I am using custom fields in react bootstrap table. { dataField: "hours", text: "# of Hours", sort: true, footer: "# of Hours", headerStyle: (colum, c

Next auth getSession with typescript

I am using next-auth getSession in API routes like this const mySession = await getSession({ req }); I am certain that the type of the mySession is this type S

Autodesk Forge - How to get all available family in revit file

I am using Autodesk Forge to build a web app, I want to get categories, families, and family types in the original revit project. I have researched but all I ca