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

blank table in the attempted use

part of the problem is that the value entered in the input is exactly what I mean by the returned element, which is "[ ]" the expected result was to be input : Name output : Name + img etc , ...
0
votes
0answers
14 views

how to make a click in anywhere changed page?

I want to understand how the transition to another page of the site is performed by clicking on this site https://weareundefined.be/ understendd that this library is used https://revealjs.com/ I see ...
0
votes
0answers
7 views

getting blank electron window while refreshing page after adding sqlite3 module in js file

In my electron app, i installed sqlite3 and import it in my javascript file using "const sqlite3 = require('sqlite3').verbose();". Then when I try to run the app, it opens. But the problem ...
0
votes
0answers
9 views

Show mobile nav on desktop

I'm working with a cms based on angular but I can't access the code directly. The code for the mobile navigation is only inserted in the html if the width of the browser is under 1024px. Therefore it'...
0
votes
0answers
9 views

Uploading Large Data files to OneDrive with Javascript

I'm trying to save large .zip files to a OneDrive folder through a custom website, and I am able to save smaller files, but when I attempt to upload larger files, it goes all the way through the ...
0
votes
2answers
12 views

How to run multiple javascript(nodejs) files in powershell at once?

If I wanted to run 10 files (.js files) on my desktop, which are all located in the same folder, how would I run every script at once? Currently I am running them all one by one by typing "node ...
0
votes
0answers
7 views

Why Gulp Serve exiting without any error message after 'serve' task?

I recently migrated a gulp file based on gulp 3.x to 4.x by adding gulp.series for tasks and async functions for the task functions But when I started gulp serve , it finishing the 'clean' and 'serve' ...
0
votes
0answers
8 views

How to serialize single row in DataTables.net?

I have a DataTables.net's table with inputs fields. <table id="example" class="table table-striped table-bordered" style="width:100%"> <thead> ...
0
votes
0answers
11 views

How to Loop Carousel that made using table in javascript with Vue.js

Hey guys I tried to make a custom carousel using table, but I got quite confused as how to make my carousel looping after hit the last tag (in this case the last tag means last of td element). ...
0
votes
0answers
18 views

Democratized Priority Algorithm

My title might be technically incorrect but I figured it helps get this post going in the right direction. I'm entering a product prioritization discussion where one of the exercises for the team is ...
0
votes
2answers
23 views

findTheOldest - Understanding reduce() method

I am trying to figure out how the reduce() method is working on this script. Everything I read about the reduce() method goes over every area of the array and adds it together. This is from the ...
0
votes
0answers
11 views

Node.js POST request has data but in mongoDB I see only the id not the data

As you can see in the picture it saves nothing. The POST request is working, but the data which I am sending to Backend it is saving only new Object with ID but not the data which I have giving. I do ...
0
votes
0answers
6 views

Sequelize - Map model to fields

Im making two models: Article and User, and the Article model contains Author and Editor fields, that must contain links to items in User table. How do I map that, so the field contains two lookups to ...
-2
votes
3answers
33 views

Why === Wont Get True in Javascript [duplicate]

var checkBalance = true; if (checkBalance === "true") { console.log("True"); } else { console.log("False"); } Why The === true doesn't matches the true because var checkBalance is true then ...
0
votes
0answers
25 views

Having difficulty pulling JSON data from URL

I am looking to pull JSON data from a website I have hosted on AWS (data here). I want to loop through the data with React and plot it incorporating the deck.gl library. Here is the code for the ...
0
votes
0answers
8 views

Role Authentication with Express

I have a MongoDB of users, each user has property that is user. Users can register, and they get default role of user, but in admin panel, you can create other admins. The problem is I have no idea ...
0
votes
0answers
13 views

How to write a Jasmine test for printer function

I am trying to write a Jasmine test for the following print function: printContent( contentName: string ) { this._console.Information( `${this.codeName}.printContent: ${contentName}`) let ...
0
votes
1answer
22 views

Transition of tabs not working only in safari

I create intern tabs with js and css, but the transition of tabs it's not working only in safari. In chrome, edge, and opera it's normal. Somebody could help me? please? function abas() { ...
0
votes
2answers
28 views

How to pre-select an option of a dynamically created elements

I have a table that is dynamically created. here is the script for that. function getreferData(dataArray) { var ray = dataArray.splice(0,1) let table = document.getElementById('...
0
votes
2answers
19 views

React/CSS: Pushing the first element of ul to left and keeping the rest to the right

I'm trying to create a nav bar with the logo to the left and the rest elements to the right. For some reason the :first-child keeps pushing all of the elements within ul to the left. JS: function ...
0
votes
0answers
21 views

Multi-Dimensional Arrays and Tables

This is my code, it's mostly completed. The issue I'm having is trying to get it to display the results in the table as "heads" or "tails" instead of 1's and 0's. I'm sure the ...
0
votes
0answers
39 views

How to push two strings into different columns of multidimensional array

I'm trying to update the state value of an array that takes a value from a string in my state. I was able to do this and store a string value into a column of an array. But now I want to store another ...
0
votes
0answers
9 views

Chrome extension showing background page content inside content script's iframe

I have a content script in my chrome extension and I want to use the google maps api to dynamically add a map to the current tab. Since I can only use the API in my background script, I send a message ...
0
votes
0answers
6 views

scrollIntoView ain't working on my react component

I'm working on a chatbot. Below is my React component.I am tring to scroll the MessageListWrapper to the bottom every time messageList gets updated. But it doesn't seem to work, in the sense the div ...
0
votes
0answers
5 views

xkey morris chart undefined get data from json

Here I want to do a data take of morris chart line through the ajax, for the call of data json is successful but when the value setting xkey and ykey I get udenfined please help me ajax script $(...
0
votes
0answers
5 views

Puppeteer application on heroku (timeout problemes after sometime of running the app)

i recently created a web scrapping app with nodejs using Puppeteer library , working perfectly in localhost , so i moved on to online hosting, went to heroku as first try, and tried the free hosting , ...
1
vote
0answers
12 views

Is it possible to rescind a web push notification

In the scenario that a push service sends push messages to multiple user agents and they all call showNotificafion. After one user agent acknowledges the notification is it possible to close the shown ...
2
votes
1answer
12 views

JS/html Game to Android app without using webview

I want to implement a js/HTML game into the android app, without using webview. basically I want to use javascript code as back end code and use android XML file for the frontend, I don't want to use ...
2
votes
1answer
34 views

Trouble iterating/mapping props

I'm trying to develop a simple application in which any number of tasks will be rendered as cards. I'm passing them as props, schemed like so: taskList: [{ taskID: 1, taskTitle:...
0
votes
1answer
22 views

How to limit user input in a datalist?

I'm trying to make a webpage that contains a list of flights which can be filtered by destination, origin, price, etc. To do this, I've put each flight into a div with its properties as its classes. ...
2
votes
1answer
25 views

img src not working in Vue js and must have a correct path?

image src not working. can anybody help me? <div v-for="(item, index) in businessItems" :key="index" class="business-item"> <div class="item-wrap"&...
1
vote
1answer
32 views

querySelectorAll/forEach not working in IE11

Trying to make some good accessible cards but having trouble with IE11 (no surprise). Pretty sure I'm missing something obvious? I know it is an issue with the js but brain is having trouble getting ...
0
votes
2answers
20 views

How to remove Iframe scrollbar but full page should load?

After adding Iframe inside contentArea, I am getting two scroll bars. I wanted to hide iframe scrollbar without hiding any content of external website link. How can I do that? I added the below ...
0
votes
1answer
24 views

assign value and display values are not same in javascript [duplicate]

Have some doubts about the javascript. when I try to console a = 021 console.log(a) // 17 why it is changing and how to store the exact value in the variable
4
votes
2answers
30 views

Object.entries(), why is my array sorted numerically by default?

I was writing a simple code exercise solution and came across what appears to be object.entries() doing an internal numeric ascending sort. I was expecting to have to sort the key value pairs myself ...
1
vote
0answers
12 views

Clicking particular class name on webpage doesn't work JAVASCRIPT CHROME EXTENSION

I'm working on chrome extension. In one of my files (content script) I want to remotely click a particular element of a particular webpage. I know class names names showed in img of elements that I ...
1
vote
2answers
18 views

Youtube iframe - 'fullscreen is unavailable'

I am using iframe to play youtube video. It display full screen icon but on click it says 'fullscreen is unavailable'. I am using allfullscreen still it is not working. Below is the code I have tried ...
-1
votes
0answers
17 views

Looking for GeoJSON data for all cities in California [closed]

I'm looking for GeoJSON data for all California cities. I've looked a while but managed to find only the main cities in CA (Los Angeles, San Francisco...). Where can I find GeoJSON data for all cities ...
1
vote
0answers
10 views

How to prevent selecting google autocomplete to put my value to the input?

I'm using Google Autocomplete and want to put street number + route value to the input field after selecting necessary location. I'm using this code let options = { types: ['address'] }; let ...
1
vote
1answer
40 views

How to show/hide React element of fected array.map()

I want to show/hide a part of JSX depending on onClickShowChart state property and output the correct chart data based on the ID. But this part inside a map loop, when i click to show element then it ...
1
vote
2answers
34 views

My Visual Studio Code extension is not showing code properly

Hello guys I am a student and a learner, new to Visual Studio code. I was working with java Scr ipt and whenever I was trying to save my code by pressing Ctrl+save button it was automatically ...
1
vote
1answer
18 views

Vue.js : Method not firing in parent component after emit

A child component emits an event on input change with a payload: Vue.component('gum-option', { inheritAttrs: false, props: ['label'], template: ` <label class="gum-option&...
0
votes
0answers
13 views

Dynamic change of images, creation of small library

I am new in programming javascript and I think about a little library that could be very useful and powerful. I want to see different images in relation on amount of scroll on viewport related to in ...
-3
votes
0answers
21 views

How to import one javascript file into another javascript file to be used in Browers? [closed]

Please tell me how to import one javascript file into another javascript file. I have tried using require(), but it does not work.
0
votes
0answers
8 views

Command handler not working | Discord JS v12

I tried to build a command handler, but I can't run commands. The result is undefined. const args = message.content.slice(bot_info.prefix.length).trim().split(/ +/g); const cmd = args.shift()....
1
vote
0answers
10 views

Validation On Multi-Page Form To Go to Next Step

I am trying to create a multi-page form in which only fields with required attribute are need to be filled before going to the next step. I am only able to configure the validation for the next step ...
0
votes
1answer
9 views

FirebaseUI - using recaptcha with email sign-in method

I want to add a captcha functionality to my FirebaseUI email-based login to make it more difficult for bots and other abusers to log into my app. I have investigated these: This link describes how to ...
-1
votes
1answer
28 views

preventDefault() Method not Working in arrow function

I have a text input and submit button I need to prevent the default behavior of reloading page when clicking on submit button. it works fine in normal function syntax but i want to understand why not ...
0
votes
1answer
20 views

How to get authentication token from front end while the user is logged in

I am trying to build a simple project where a user can search a movie from an api and add the selected movie to their "/movies" page, after being logged in. I am using Nodejs, mongodb, ...
1
vote
1answer
18 views

Validation in React Hook Form to make sure at least one checkbox is checked?

I am working on a form in which I have a section of it that needs to have at least one of the checkboxes checked. I am using ReactJS and a React Hook Form. Here is the checkbox section of code within ...

1
2 3 4 5
41291