Category "javascript"

Bind JSON attribute with livewire

I have a Test model, with the JSON attribute inputs, which is a flat array of strings (e.g. ['foo', 'bar', 'baz']). I'm trying to bind this field up to Livewire

How to load 3rd-party scripts into a site using web workers

I have seen a lot about offloading large scripts from the main thread to help improve website performance and Google's Core Web Vitals. I am curious if there is

How to ping message author and user in Discord.js embed

i recently started with Discord.js and i am currently making a hug command. the command itself is working fine, but the problem i am facing is that i want the b

Dynamic Angular Forms on User Interaction

I have a dropdown that the user uses to switch between different Angular forms. HTML <form [formGroup]="evalForm"> <mat-form-field appearance="fill

Bootstrap 5 tooltip placement top issue when page has a scroll

I have an issue with tooltips in bootstrap when the placement top is forced. I use the latest version for now: 5.1.3 I have tried to create a code snipped, but

(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