Category "javascript"

(React) Easiest way to reveal on scroll?? (Scroll Fade)

I'm trying to figure out the best way to have a scroll fade in on my webpage. I tried using React Reveal however it breaks everything if you are on version 17 o

Why does my return statement give undefined as the value when the console.log gives proper value?

I'm just trying to get the first object in the returned array from the database fetch and return the .class_name value of that object. In the getClassName(), th

jsdoc error ENOENT: no such file or directory, open './readme/readme.md'

I have already installed jsdoc with npm i -D jsdoc command and created jsdoc.json file. In package.json file there is script called doc and after doing npm run

how to add data to database in django

I send the data I get from websocket with javascript to the view.py section of python-django with var xhr = new XMLHttpRequest() ///. my question is; The data c

Render a react component in a new window

I am developing a Certificate Management System where after all the processes have been done, the user may print a certificate. I am struggling to implement suc

JS Fetch Single Record From Laravel Controller

I work in laravel and trying to get the response from the page. This is the controller in question: public function counter($id) { $toSearch = $id * 10000;

How to distinguish between two calls of the same method based on the argumetns?

I'm using sinon to stub functions of the Google Drive in my NodeJS application. I do two different calls of the create method under the same test (I can't do re

Creating an immutable object as a class in javascript

I would like to create an object that has various methods, but the core data can never be changed. If using a class-based approach, are using private variables

How to format reference line in lightweight charts?

How to format reference line in lightweight charts? Following is lightweight chart. As you can se the horizontal line market (US$449,308,044) is taking so much

How to handle null case in Angular?

This my html code and below in my ts code , <div id="address" class="bg-light rounded mt-3"> <div class="h5 font-weight-bold text-prim

Why am I not able to get rid of a context menu with Selenium or brute force Javascript

I have tried just about everything, but I am not able to get rid of the context menu. Steps Right click context menu. Accept alert Try to get rid of the context

I am getting "'navBar' is defined but never used no-unused-vars" warning .How to solve it? (React App)

import './App.css'; import Search from './components/HomePage/SearchBar'; import navBar from './components/common/Header.js'; import footer from './components/c

set arrow with tooltip of matTooltip angular material

in angular material it provide matTooltip attribute to show tooltip . i want to show arrow with tooltip pointing towards overflow text. but tooltip position is

How to get input in a for loop in Node.js with only using the inbuilt methods?

I am trying to get multiple input and process them in the for loop. For Example - for(let i = 0; i < 10; i++) { input = how to get this is my question

Node JS "Importing binding name 'default' cannot be resolved by star export entries" for HLS.js

Currently I have the following folder layouts in node JS and installed express js sdk-components --- HlsLoader.js node_modules --- hls.js --- s

Is there a reason why my html refuses to call the javascript function from external .js file?

EDIT: Thankyou for the instructive responses, however, nothing has been succesful. Everything works as it is supposed to otherwise, but for some reason the <

The exported contents start at the middle of the page

I have a problem with jsPDF in wordpress website which built by elementor. The exported PDF starts from the middle of the page ! In normal content it works fine

SWR not working properly with async fetch

Recently updated SWR - now for some reason my data is not fetching properly. const { data: expressionsData, error: expressionsError } = useSWRImmutable(

How to add badge next to icon in ag grid

How do I add a badge to an icon that is being displayed in AG Grid using cell renderer: I've tried this so far in my grid config: cellRenderer: function(context

SVG scale animation also cause transformX and transformY to animate(anime.js)

I have the following svg :- anime({ targets: '#el-shape', scale: [0, 1], easing: 'easeInOutSine', duration: 1000, loop: true }); <sc