Questions tagged [javascript]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). This tag is rarely used alone but is most often associated with the tags [node.js], [jquery],[json], and [html].

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

how to get the diffs from two/three files and combine them in node?

I have been playing with webpack and I was able to output and transform es5 buid to have nomodule in the tags directly from HtmlWebpackPlugin using hooks. Same for the es6 build but putting type="...
0
votes
0answers
11 views

Javascript - Get custom attribute of each selectpicker selected value

I receive an array of objects which are the selected options of a bootstrap selectpicker using var roles = $("#adminUserRoles").find("option:selected");. I would like to loop over ...
0
votes
0answers
19 views

Webpage Content is not visible when it is online

I have uploaded my website on google driver and linked it to drv.tw. I am unable to see text and images but Offline I am able to see Note : I kept all files and folder public, clear the cache I am ...
0
votes
0answers
6 views

Unable to implement OTP with Web OTP API

Web OTP API information provided by https://web.dev/web-otp is good. But demo provided in https://web-otp.glitch.me/ is working as of now with Version 86.0.4240.111 (Official Build) (64-bit). The main ...
0
votes
0answers
13 views

How do I limit copies sold in a certain purchase/release amount?

Imagine this: You're a book writer, and you're popular. All of your books have sold out within minutes in release. Say that you want to limit book copies sold to the first 1400 people that reach your ...
-1
votes
0answers
12 views

Webpage Expired IE 11 when pop-up window is closed

I have the main window, from which I create a child pop-up window. AJAX request is made from the pop-up window, and before the server could return the response, I'm closing the pop-up window using the ...
0
votes
1answer
13 views

How to print the name of corresponding value of select tag?

We can print the value of select option using document.querySelector(".choose").value; but I need the name of it's corresponding value Ex: If the value of select is "VAR CHAR" but ...
0
votes
0answers
13 views

How to send SNS topic a message from Node.js Lambda function

An SNS topic has been created to call a subscribed Lambda function which adds a user to a group in Cognito. Sending a message to the topic using the console in the web browser works correctly. The ...
-4
votes
2answers
24 views

I need help to build a simple website builder

Heyy, I want to make an elementary website builder make front-end websites only. Here is the problem: I want to have 2 webpages, set.html and index.html (the user will make). In set.html, I want the ...
0
votes
0answers
11 views

How to create Hexagon Shaped progressbar in angular

I trying to achieve something like this image from Vikinger social media template, where i have mainly three hexagon shapes one is the outer border, second one is the hexagonal progress bar and third ...
1
vote
1answer
13 views

Best way to custom style the packages installed in Angular application

I have came across this couple of times and have been in back of my mind for sometime. When we install any packages in our angular applications and use the same in any of the component, it often need ...
0
votes
0answers
6 views

Importing CryptoJS modules in webpack also imports crypto-js/core

I am using 3 crypto js modules. crypto-js/sha1, crypto-js/hmac-sha256, and crypto-js/enc-base64. For now I've been adding them through jsdlvr using <script src="https://cdn.jsdelivr.net/...
1
vote
2answers
27 views

dataLayer.push duplicated

I'm trying to push the dataLayer. But it keeps giving me a duplicate array. Please see below my code <script src="https://code.jquery.com/jquery-3.5.0.js"></script> <script&...
0
votes
1answer
17 views

Is there a way to get client Machine name or MAC ID or anything Identical of client machine

I'm developing a web application for one of my client. Their requirement is to collect the chit payment from their customers. So in single office there have multiple counters user can go and pay in ...
0
votes
0answers
15 views

Node env variables: Do they persist?

package.json "scripts": { "start": "node app.js", "test": "NODE_ENV=test mocha --reporter spec" }, npm run test if (process.env.NODE_ENV === &...
0
votes
0answers
11 views

create a webApp just like Scratch Programming or how to use Api of Scratch programming

create a webApp just like Scratch Programming or how to use Api of Scratch programming in our project npm i scratch-api
0
votes
4answers
27 views

adding key to map function is not working

I am currently trying to add a key to my map. However, when I try and give it an index, it then shows up with persons as undefined. Where it was working before. Here is what I have done. <div ...
0
votes
2answers
22 views

How to run animation every time onClick in React?

I want an animation that runs on every click. However, it runs only the first time and not after the second click. Is there a way? const inputEl = useRef(); const onButtonClick = () => { ...
1
vote
3answers
39 views

How to Get values inside Arrow function

How to Get values inside Arrow function, which is Inside an Object. I want to access other properties of that Object. let obj = { name:'Ashu', age:123, show: ()=>{ // I want to print ...
0
votes
0answers
18 views

Append options to select box depend on extracted part from array

I have 4 selectboxs moduleName, submoduleName, ProgrameName and last selectbox has all data for username, module, submodule and programe name merged and splited with ";" between each other, ...
-2
votes
0answers
12 views

how to display a web browser pop-up alert when user is not on the page?

I am building an application that will contain pop up alert displayed to the user even if the user is not on the page like advertisment pop-up alert with javascript but I can figure out how it works. ...
1
vote
1answer
32 views

Creating a Linux terminal themed website using HTML and JavaScript

I am trying to create a Linux terminal themed website which has multiple commands. The user has liberty to use whichever commands he/she wants just like a normal terminal. I've created a sample HTML ...
0
votes
0answers
17 views

Reading csv file throws error fs.readFileSync) is not a function

I would like read a csv file from downloads folder and copy as json to fixture folder. I am getting below error _fs.readFileSync is not a function When I set a break point I could see csv file ...
0
votes
0answers
7 views

Firebase Creating Dynamic Links with the REST API call using Javascript giving 400

I am trying to create Firebase Dynamic Links with REST API using simple Javascript ajax code, but every time I am getting 400 bad request, though I have tried and implemented the documentation ...
0
votes
1answer
17 views

Update state between different instance of react

Imagine I have a simple react app as follows: import React, { useState } from "react"; const MyComponent = ({ sessionId }) => { const [status, setStatus] = useState("Something&...
0
votes
0answers
27 views

Function is not changing outer variable [duplicate]

I'm new to Javascript The function is not changing the outer variable function edit(array, letter){ array = 0; letter = 'b'; } let string = 'a'; let array = [1,0,2]; edit(array, string); ...
1
vote
1answer
18 views

How to validate a hidden empty field in jquery steps with a function true

I have some fields that write themselves as I use the form, all the fields are hidden I would like to know how to make jquery validate validate that the field is not empty this is the input <input ...
0
votes
0answers
10 views

Shows 2 photos of the place in the info window Google Maps API

I want to ask about Google Maps API. I'm currently using google maps api for contact us page maps feature. I want to display 2 photos, place name and address in the info window like image below. I ...
0
votes
0answers
7 views

Data-bind:visible on page load is not working as expected

I have check box field and depending on the selection/deselection I will need to need to show/hide the div class. One page load I want to show the div class , since I am having the visibility tied to ...
-1
votes
0answers
8 views

Creating Thumbnail Cloud Function in GCP

I am trying to Create a Cloud Function that executes every time an object is created in a Storage bucket. The function needs to create a thumbnail after the execution. I can create the cloud function ...
0
votes
0answers
20 views

Laravel inserts a null value when trying to insert an array to the database

when i try to insert an array to the database, a null value is passes with the array as shown in the below image This is how the input fields looks like Here this is the Table which will be cloned ...
0
votes
0answers
16 views

How to send a message to a specific channel with discord.js? Error: undefined

My code isnt working even though i did the exact same thing which should work const { Client } = require("discord.js"); const client = new Client({ disableMentions: "everyone"}); ...
0
votes
0answers
6 views

Passing Hidden Form Inputs with Laravel Livewire

I am running into an issue where I am using javascript to populate two hidden input fields as a user moves around a cropping tool on an image. The hidden inputs are being populated with the pixels ...
0
votes
0answers
10 views

How to use ajax to send array in the same page, then use loop to save the data to database

I have a question about how to save data from selected rows in a datatable to a database. I can already get the STAFF_ID based on the checked box from the datatable. Right now, I'm trying to save the ...
0
votes
2answers
23 views

Reset of 1 minute counter in hooks isn't working properly

I'm creating 1 minute counter and it's working but when I click on the reset button to restart the same counter, getting weird behavior. Here is the code export default function App() { const [...
0
votes
1answer
18 views

Send email with specific tex/ number in column

I need to send email base on a text string has " Missed Deadline" i've use If function but it seem like does not work. The script send all the row. Please help me out here. Thank you very ...
0
votes
0answers
31 views

Why does split() method output different result in a for loop rather than outside of a for loop when trying to concatenate items in an array

let contacts = ['chris:5612', 'alex:74747']; function myFunction() { for (let i = 0; i < contacts.length; i++) { let splitContact = contacts[i].split(':'); console.log(...
0
votes
0answers
9 views

Trouble with getting a mov file to appear in HTML and js

Right now, I'm trying to change the content of a webpage using javascript querySelector on a premade 'div' and set the innerHTML to the stuff I want it to be. So far, I've been successful in changing ...
0
votes
0answers
11 views

How to create a lazy loaded ads sidebar

I am creating a new blog and I would like to show ads on the sidebar including adsense and other CPM ads. So i saw an interesting implementation on 'search engine journal' blog posts. When you scroll ...
0
votes
1answer
13 views

Javascript CSV export with BOM charset

So I have my function like below and would like to see if I am able to convert the default charset to BOM upon generation, I would like to solve the garbled code problem in excel. exportCSVFile(...
0
votes
0answers
8 views

How to digital sign data with pkcs7 with base 64 encoding using node JS

I want to sign my data using pkcs7 with base64 encoding for this i have used node-forge module below is the code let privateKeyCertificatePFXPath = __base + '\SIGNER.pfx'; let ...
-7
votes
0answers
19 views

How Master the Frontend web development? [closed]

Basically, I want to ask how can anyone master the front-end in one year?. What technology, framework, library, testing tool etc. and project need to done.
0
votes
0answers
11 views

VBA to click html button: How to determine which html line to click?

I am using VBA to automate the manual entry of form. I have successfully used the VBA to navigate through the website from the login page up until this point. So I have to click a "Create" ...
1
vote
0answers
17 views

Dynamic script for closing bootstrap modal in WordPress Loop

I have some HTML code which displays 3 videos and a script to stop the video when the modal is closed. HTML code <!-- Grid row --> <div class="row"> <!-- Grid column --> ...
0
votes
1answer
41 views

Is it possible to compile/execute/debug pure JavaScript in VS Code terminal?

For example, if I have a .js file with pure JavaScript code like: function doIt(a, b) { return a + b; } Is it possible to, within the VS Code terminal, execute the code -- just like I would in a ...
-1
votes
0answers
13 views

Scaling, Dragging, Cloning SVG with Javascript [closed]

I am trying to build browser based SVG editor with minimal features for a small project. I could clone the SVG image to another SVG image as a canvas. I could clone text to this canvas but it is not ...
1
vote
1answer
11 views

How to configure a different polling interval in Truffle?

How does one configure either Truffle itself, or Truffle's HDWalletProvider such that the poll interval is different? I would like my Truffle instance to be less "chatty" over JSON-RPC, when ...
-2
votes
0answers
15 views

refactoring old functions addEventListener

I have been reusing some old functions that were titled addEventListeners notice the s at the end. They were used to create a drag and drop functionality for chess and they continue to work. However, ...
0
votes
0answers
23 views

Moving a var value from JS file to index.ejs

@Ken Nguyen Hi Can you please help again; Project: I have buttons on Index.ejs to send Connect and Disconnect requests to a (TCP server localhost 3040) which is a Telescope with 2 two camera’s, Auto ...
0
votes
0answers
30 views

dispatch is not updating reducer

I'm using useReducer and useContext as a flux store and i'm boggled on why i'm unable to update the stores state. Here is a sample of the code I'm working with. reducer and initial state export const ...

1
2 3 4 5
42272