How are we doing? Please help us improve Stack Overflow. Take our short survey

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
8 views

Scraper keeps timing out - Waiting for Selector

Anyone know how to solve this tough problem? The scraper keeps generating the error: waiting for selector. I've tried changing the elements and I think it might ahve to do with the "await page ...
0
votes
0answers
11 views

Extracting values from Text Documents using Javascript/Regex

I'm trying to fetch a text document using Javascript. From the text document, I need to extract all the lines that only start with ====> . Each Line has four parts. ====>0012 Some Texts - ...
0
votes
0answers
7 views

save items from a table in json with electron

I'm having trouble saving table items in json with electron. I am using "Lowdb". The code I have to add is the following: this.CreateNew = function (oButton) { var activeRow = ...
0
votes
0answers
9 views

Processing large file and nodes and memory limit in nodejs

I have to open a very large file ~15GB and trying to read the whole file using fs.readFileSync and then put the whole file into hashmap based on a key to dedup the file. But then soon I hit the issue ...
0
votes
0answers
9 views

What kind of cloud services I can work with Socket.io? Whether I should use IaaS, PaaS or SaaS

I’m a beginner in cloud computing topics. Would I like to know what kind of cloud I can work on a project using Socket.io? Whether I should use IaaS, PaaS, or Saas, also what kind of provider(AWS, GCP,...
0
votes
0answers
10 views

Heroku “cannot GET /” Error only when deployed

I'm trying to get my node.js website online with Heroku. I can run the entire website flawlessly on my local machine by simply running node server.js. Accordingly, my Procfile in the root directory ...
0
votes
0answers
8 views

How to make combine only UI with react-beautiful-dnd?

I'm new to react-beautiful-dnd and I'm looking for code organization to solve my problem. I have three lists. Each list contains a set of items. Any item from specific list can be combined with items ...
-1
votes
0answers
22 views

How can I make javascript query to close a modal like this? [closed]

I want to click the modal and show something like this and when i click the x to close it.enter image description here
0
votes
0answers
11 views

Pass array from JavaScript to Ejs

Is there any way we can pass values from javaScript to ejs without using document.createElement? My View Engine is set as 'ejs' in express. I am making single page application and fetching data via ...
0
votes
0answers
16 views

why tooltip is not hide on mouseleave event in react?

I am trying to show tooltip on mouse enter and hide on mouse leave.first i make a simple demo which is working fine. https://codesandbox.io/s/exciting-shannon-4zuij?file=/src/list.js above code ...
-1
votes
0answers
11 views

Ternary operator evaluating incorrectly [duplicate]

I have a React app which contains links to subroutes, and I use the subdomain/path to populate the props on each detail page. In other words, when a user navigates to a page I use pathname to populate ...
-1
votes
0answers
12 views

PopUp form tracking event “change” input

I have site It has forms that open in a popup. I want to track changes to form fields using the "change" event. But this is a popup form and I need to track the DOM change first. How can ...
0
votes
2answers
28 views

How to make space for images before they load?

I am currently building a portfolio website for myself. I have an array of projects that are flex and change size as the window changes size, once they get to a min-width they wrap over to the next ...
0
votes
0answers
14 views

JS Automatically press enter after key bind

$(document).ready(function() { $(document).bind("keydown", function(e) { if (e.keyCode == 66) { console.log(e.keyCode); $(".games .slick-current a:first-of-...
0
votes
0answers
7 views

Bootstrap tooltip works in one React component but not the other

I'm making a card game with React on the front end and I have two components in which I want to have Bootstrap tooltips, however only one of them, my Card component, is working. I have a Hand ...
1
vote
2answers
34 views

Javascript: How to get value of key in array

I'm trying to get one value of the first item in each object. My code works to get the objects but I can't figure out how to get the value that I want. function getExcerpt() { var ourRequest = new ...
0
votes
0answers
7 views

Looking for help to make npm/pdfjs-dist work with Webpack and Django

I've been trying for a few hours replacing a link-based pdf.js with an npm install of pdfjs-dist, since I noticed that my links were not meant to be used as cdns and could become unstable as described ...
0
votes
0answers
5 views

Get Translation file from URL i18n React Native

I'm trying to get the translation file from a API. Will it work, when I Upload for example the en.js File to my Server and require it inside the i18n.js class? the en.js file will look like that: ...
1
vote
0answers
16 views

Synchronously post a message to a worker_thread. Sending thread blocked, worker_thread unblocked

Is there a way to synchronously post a message to another worker_thread? In this scenario a) the receiving thread will do async networked operations and should not be blocked b) the sending thread ...
0
votes
0answers
28 views

Javascript HTML file into another, find a duplicated IDs [duplicate]

I'm developing a web shopping bot, it works but I need to write the payment info, the problem is that there is like one HTML file inside another, I haven't seen it before: When I execute the ...
2
votes
0answers
13 views

Is there a way to format text in embeds using discord.js?

I'm kinda new to coding discord bots using discord.js and I was wondering if I could format the text in embeds. I can't find the way of doing it, as I have the value of the field in between these ...
0
votes
2answers
13 views

How to add “selected” attribute dynamically to select option in javascript?

I have a javascript automated form creation formula. I'm struggling with the "selected" attribute of option in a select list. I'd like to have the option selected which matches the the const ...
-1
votes
1answer
21 views

TypeScript: is there a way to programatically construct an interface using an enum

So I have an enum defined as this enum EventType { JOB, JOB_EXECUTION, JOB_GROUP } And I need to create an interface like this interface EventConfigurations { JOB: { Enabled?: boolean; }...
0
votes
0answers
10 views

JSP/Spring MVC - How to populate list dynamically with elements added to model (javascript/jQuery)

First my apologies if the question is not clear enough. I will edit it if convenient to see if this can help someone else in the future. I have a form in a JSP binded to a Spring MVC model which would ...
0
votes
0answers
16 views

Design pattern - Writing an API wrapper library (typescript)

facing a bit of a problem trying to come up with a way to code this. Let me start this off by saying this is not my forte, nor have I tried something like this before. Aim: creating a wrapper API ...
1
vote
1answer
26 views

Call the elements of a JSON without a key

I have a group of JSON arrays that look like this: [ { team: 111, enemyId: 123123, enemyTeam: '', winnerId: 7969, won: 1, result:...
-2
votes
0answers
19 views

What is wrong with this regex in javascript? I am getting error: unterminated regular expression literal [closed]

I am trying to count number of lines in a textarea using jquery. Here is my code var lines = \$('#log_form_textarea').value.split(/\r\n|\r|\n/).length; But I am getting error: Uncaught ...
0
votes
1answer
11 views

Greensock gsap javascript throwing error and demo in codepen

I have been working on an animation using javascript, but I'm getting an error that I cannot seem to solve. Link to Codepen Uncaught SyntaxError: Unexpected token '.' at https://cdpn.io/boomboom/...
0
votes
1answer
21 views

React reduce, replace, and wrap in span

I'm using a Map to take in JSON data and create a list item for each value. Then I'm replacing specific parts of the strings with state values. const content = { "content": [ { &...
0
votes
0answers
7 views

How to configure image upload in CKEditor 5?

I'm using CKEditor 5 and when I try to upload an image it's working well, but not with my configuration and I don't know why. Here is my UploadAdapter class. export class UploadAdapter { private ...
0
votes
0answers
14 views

Function not being excuted when submit button pressed React form

I am tryng to redesign my application to incorporate react. I have written a c# MVC application that uses a submit form. The function below works in c# but not in react. In c# it works from an onClick ...
0
votes
0answers
20 views

Is it possible to load, then select a child node if the parent node is unknown to the tree?

I am using jsTree as a navigator for the user to select different items which display in another pane. So far everything is working as expected except if the user (from the other pane) selects an item ...
0
votes
1answer
15 views

Replace certain character in Discord.JS

Now, before you say that this has been posted before, I have a different situation. With that out of the way, let's get on with the question. I am making a Discord bot for a friend that does duties ...
0
votes
0answers
7 views

When I click on empty space the menu does not close. I am having the problem in v-select component

No matter where I click, the menu does not close without choosing an option. This is a big problem. how can i solve this. I am having the problem in v-select component. I just wrote the code snippet I ...
0
votes
1answer
26 views

TypeScript: is there a way to parameterize an enum

I have this enum defined in our codebase. enum EventDesc { EVENT1 = 'event 1', EVENT2 = 'event 2', EVENT3 = 'event 3' } EVENT1, EVENT2, EVENT3 are the event types defined on the backend. And ...
0
votes
1answer
21 views

Integrate PHP variables in Javascript [duplicate]

I have this Javascript which outputs a chart with some values: <script type="text/javascript"> //pie var ctxP = document.getElementById("pieChart").getContext('2d'...
0
votes
0answers
16 views

How to add css to a child component from parent component if i'm using modular CSS

In my project i have 3 simple components: List , Table and Item. The item component is the children of both the List and Table component, and both List and Table components are rendered on different ...
-1
votes
0answers
9 views

javascript automatic functions based on events

i have a lot easier time in python if anyone wants to help with this one i am starting now but see imminent failure with my first attempt to make a function which automatically blocks new users from ...
0
votes
3answers
34 views

how to edit json quickly

I make a table in Excel with 1000 questions and when convert it on JSON, I get: { "QUESTION":"LALALLA", "ANSWERS":"123214", "CORRECT&...
0
votes
0answers
5 views

how to obfuscate javascript file using maven in spring boot application

I am having javascript file in springboot application where I am able to minify using com.samaxes.maven minify-maven-plugin, but not able to obfuscate.How to perform obfuscate in maven using spring ...
0
votes
0answers
7 views

How to render a formula through Mathjax when it's called on the Javascript and I want to output the values of variables?

Some time ago I coded an in-browser fraction calculator and now I decided to use Mathjax in order to render the output in a more visually pleasant fashion. The problem is the formulas to be outputted ...
0
votes
2answers
28 views

Array in React being mutated

I've read several entries on keeping arrays from being mutated in React, but I can't figure out why my original array is being mutated. In the componentDidMount, I'm going to the database and ...
1
vote
2answers
39 views

How to make an array filter return AND results instead of OR in javascript

Currently my code shows images based on what check boxes a user selects. The array treatments[i] shows everything they check (this OR this OR this). It builds on itself. What I want is an AND ...
0
votes
1answer
16 views

node express hits :id instead of 404

I'm developing a small api collection to study nodejs with express and I've found myself in this situation. I have `app.use("/v1/phrases", phraseRouter); In the router I have the following ...
-1
votes
0answers
9 views

javascript refuses to load on chrome [duplicate]

I dont see the problem in this but in the below code when you click the submit button it says file not found. I know its the javascript that it bombs on because you get a refused to load file C:///......
-3
votes
0answers
12 views

My question is on how to create Image pop-up using html, css and vanilla Javascript

How do I create an image popup with CSS, HTML5 and Vanilla Javascript (No framework) so that once I click an image, the image pops up and when I click the image again, it closes. Once I click an image ...
1
vote
4answers
65 views

add addEventListener to all the buttons

Well the thing is this, I already match up the audio with the keys using the atribute "data-key" doing in this way: const audio = document.querySelector(`audio[data-key="${e.keyCode}&...
0
votes
1answer
28 views

Making a password search space calculator & Need help creating a function that creates a recursion based on a variable in (java) in html

Been making a brute force password search space calculator, I've gotten pretty far in it. [Possible combinations] = [possible number of characters (To the Power of) The Password length] and while ...
0
votes
0answers
6 views

Is the MediaSource API beneficial when streaming static, single bitrate videos?

I want to work on an app that streams video/audio files. If I am not interested in having the ability to adaptively change bitrates, then is there any benefit of using the MediaSource API? My ...
-3
votes
0answers
10 views

how to pass images between flask and html/js

I'm currently working on a project where i want the user to be able to upload pictures, then they should be passed to my flask backend where I'll do operations on the pictures and then bring them up ...

1
2 3 4 5
…
41476