Category "javascript"

How can i make dynamically change color and font weight of text/numbers in LWC?

I want to change the values of numbers dynamically depending on certain conditions. When the number is less than 0, I want to change the number's color: red, an

Elementor White Screen of Death and JSON ERROR

I need your help. I am using elementor on my website for editing a WordPress website, but lately, I have been having a problem when it comes to loading it up fo

Mobile bar closing transition isn't working on my code?

I'm new to coding, and I do not understand what is wrong with my code. The menu bar is for the media. I have it set to transition when a user clicks on it, and

Puppeteer getting response from url pdf

I'. automating regression tests for a website and one of the tasks is to check the various urls that come in to me. I am using Puppeteer and Chromium for this.

Uncaught ReferenceError in External JS

I am not sure why I am getting this error: Uncaught ReferenceError: test is not defined. Can anybody please help me figure this out? Here is my code for html f

How to change dynamically 'aria-pressed' = false to true using JS

I have no idea about JS. But there is needed one line of code. i have below JS code. const quillEditors = document.getElementsByTagName('quill-editor'); f

Store redux data that can be accessible with swift and java

I want to rewrite my React Native application with Java for Android and Swift for iOS. The thing is, I don't want to lose application data so that the user has

Convert String to Date then to timestamp to add to firestore

Okay so I've got two react native componenet DateTimePicker that I use to collect a date and time from the user using the following on change func const onChan

How can I toggleClass on this element and hide others?

I would like to toggle show a megamenu clicking on his parent tag and at the same time close all other megamenu if opened. with my basic example code (just to e

How to load the correct KML according to location?

I have 15 kml files and I have a map from google map api, still I haven't found some way to put the correct kml from 15 kml files that I have according if the l

Wiremock request matching with dynamic date - How to check a date in test?

I need to check in my test, that the date in request is exactly Today. How can I do this? Tried different ways from the Doc, but haven't got the desired result.

get data-value with variable value

I have a data-value in my php code that is used in several places, for example: <a class="dropdown-item" data-value="<?= $i ?>"></a> <a cla

How to fetch data only on first click via react-query and then disable refetch on subsequent clicks

I encountered a problem while implementing the form where the data used in select, retrieved from the database via react-query, should only be retrieved once wh

Change the background colour of a table cell if the content is not the same as another cell

I have an output.php. It creates an html table with 3 columns: Question number, Correct Answer, Student Answer. Works just as I want it to. Now what I would lik

How to render jsx calling non component function in React?

I adding return before jsx but it stops iteration function App(){ function recursion(object){ for(let key in object){ if(typeof object[key] === 'ob

useState value not rendering in DOM

I am an absolute beginner with React, I have a component where I need to render the value of a state to the Dom but it doesnt work let me show you my code. Link

Using React to reset the size of a div with CSS resize enabled

Currently I have a resizable div using resize: both; in its CSS. I'd like to make a function to reset the div back to its initial percentage-based size. I got t

<Link> does not work as expected in NextJS

I am working on creating a Next.js app and part of it requires me to create a dynamic route on click of a card component. However, after wrapping my Cards with

Vue3 - Ace Editor on v-model change

I am using Ace Editor with Vue3: <v-ace-editor v-model:value="currentRecord.prompt" lang="json" theme="textmate" style="height: 100%;" :o

Unable to integrate Stripe checkout into Vue JS app

I am trying to redirect to stripe checkout using a click event that calls the payStripe function <button @click="payStripe" class="btn btn-primary" type="but