Category "javascript"

Preloading a large background image without rendering the website

I would like to make sure that my image preloads properly, as there's an svg effect, that only looks good when the background is loaded. function preloader() {

CSS : selecting multiple nth-child

Say I have this css : div div p:nth-child(1), div div p:nth-child(2), div div p:nth-child(3), div div p:nth-child(4), div div p:nth-child(5) { } This will sele

Display a list when i click next or previous button in VueJS

I would like to manage a case in js view. I have a list of employees who arrive in a department and also leave the department. My list returns me 3 objects (ent

Avoid URL parameter Manipulation

So in my case, after a user chooses a certain room, the number of nights he will stay and the number of guests, the price gets calculated (depending on certain

Retrieving images from json server and display with relevant question

I am building a trivia app. initially I just implemented plain text Q&A trivia but now I also want to add images with questions. I am getting data from my l

Color picking by coordinates

When using a colorpicker like from google, the luminosity at the top left is 100%, on the top right it is 50%. However on both corners on the bottom the luminos

Why is the method executed immediately when I use setTimeout?

I'm trying to write a simple code with a setTimeout, but the setTimeout just won't wait the time it's supposes to and the code execute immediately. What am I do

Typescript auto generated JS file: "Uncaught TypeError: Failed to resolve module specifier"

Currently working on a Blazor project where I want advanced mapping functionality, using the Leaflet.js library with typescript bindings. I have added leaflet a

How to use recaptcha v3 in chrome extension?

Is it possible to use reCaptcha V3 in chrome extension. If yes, than how to implement it? Currently I am implementing it and facing error Refused to load the sc

express-session unable to retrieve session variable

I am using express-session to store my sessions persistently on a MongoDB database. The project worked perfectly in a development environment but for some reaso

Best way to structure deep time-series data in MongoDB?

I'm migrated from MySQL to MongoDB and looking to optimize the storage of my time-series data. Each item in my database has an array of values for multiple loca

Echo from video recorder/player (On page load)

I have a video player and recorder that allows the user to record themselves, play back the video, and download. The code renders: • Two video players vert

Laravel livewire display session message with javascript

I am trying to submit a contact form using laravel livewire like: public $name; public $email; public $phone; public $message; public function submitForm() {

React Native Render Error: 'Target Container is not a DOM Element'

We are building a React Native application, sort of like a marketplace for different services and products. Our current problem is concerning using the BottomTa

Invalid Key Length in NodeJS, but Valid Key Length in C#

I'm converting Rijndael decryption from C# to NodeJS. The Key (or Passphrase) used is 13 characters long. The IV used is 17 characters long. Note: I have no con

How can I filter data in a react redux app gotten from an api

I am fetching data from an API and displaying it in NearestRides component(it gives a nested object). I need to filter the data based on state or city selected

Tell JavaScript my array is sorted when searching for an element

I have an array of objects that I know is sorted by one of the object properties. I want to look in the array for the object with that property equalling a spec

Using innerText without async in puppeteer

i was creating a certain code of puppeteer ,and i wanted to know if there's a way to get innertext or innerHtml or textcontent while using puppeteer without an

Change bootstrap multiselect values based on another select options, using jquery

I have a simple form created using HTML and JS. There are 3 select elements that the options of the second and the third select elements are based on the first

Why does the filter method not seem to work the same way as splice does in this todo app?

I have a todo app in JS with the following functions: This is part of a function that passes an id into an event listener to remove a todo removeButton.addEvent