Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Browsing all 139805 articles
Browse latest View live
↧

React call api when component is rendered runs twice

I have been studying react and searching and didn't find any answer for this. So I have this component that calls my api to know what to do when it is rendered. The problem is that it is rendered...

View Article


How to use app.service('myService') inside a FeathersJS service extension?

I am trying to extend find() method for a service named properties in my FeathersJS app.What I need is appending in all records returned by find() an array with integers coming from another service...

View Article


Jquery Dialog not loading in aspnet MVC

i want to be to display child records when i click a button . The data is displayed as a table.I have created a partial view that will display the records.I have created a controller action method to...

View Article

discord.js read reactions from old message

I started to write an discord bot with discord.js 11.5.I don't want to use an event like client.on() because it takes days until everybody added his reactions and it's in a small channel which is...

View Article

Displaying Javascript variable into multiline in a div

I am getting dynamic variable from webservice. I want to add the empty space or breaktag tag in the javascript variable.For eg: let myVal = "myname 123456789 NZD".when displaying in the UI I want to...

View Article


How to parse a small subset of Markdown into React components?

I have a very small subset of Markdown along with some custom html that I would like to parse into React components. For example, I would like to turn this following string:hello *asdf* *how* _are_ you...

View Article

Why is my HTML file unable to use the javascript file that I have linked?

Javascript file is not used in the html file despite linking itI am unable to use the javascript file and validate my HTML form. I am wondering if the issue is the linking of the src directory is wrong...

View Article

How to Correcly Filter Through Array

I am trying to compare two arrays but it is not filtering correctly. I am trying to add users, my function compares the ID and StaffID and if the StaffID is not in the current user array it should set...

View Article


Angular2 run Guard after another guard resolved

In my project I have two guards. AuthGuard and PermissionGuard. I need to first AuthGuard runs and when it resolved and if true the permissionGuard begins but now this guards are running parallel and...

View Article


If paired braces present, only allow specific strings regex

I'm trying to validate user inputed tokens. My rule is, if the user enters a string between dual braces, {{myToken}} then only specific words will be allow to be placed between them. For this example,...

View Article

Implementing OR in firestore query - Firebase firestore

I am trying implement logical OR operator in firestore query.db.collection('users').where('company_id', '==', companyId) .where('role', '==', 'Maker') .where('role', '==', 'Checker') .where('role',...

View Article

Webaudio playing two oscillator sounds in a same time causes vibration sound

Using Web Audio, I generated a sound, but it sounds really bad (vibration). If I use very low gain, then it's better, but too quiet. Same as using low pass filter with very low value. What's the...

View Article

CustomMenu React-Hooks & Nextjs

I am making a personalized multiple links menu with react-hooks and next, the objective of the component is when an option is selected, it has to be marked with an arrow and the content must be shown...

View Article


What is the purpose of an extra variable when Babel and Traceur transpile an...

Both Babel and Traceur would transpile for the following codeobj = { fullName: "Peter", say() { console.log("My name is", this.fullName); } }; let { fullName, say } = obj; as "use strict"; obj = {...

View Article

How do I promote/provide my Webdeveloping service?

i really like to develope Websites for me, my familiy and friends. My brother himself is the head of a quiet "successful" little programming company (10+ employees). Atm I visit the school and will be...

View Article


Timer Isn't Counting Down In Real-time

I have a countdown clock which sort of works but then it doesn't seem to be counting down in real-time. The countdown does happens only when you refresh the page. I'm unfamiliar with javascript so I...

View Article

Filter objects by className from nodeList

I've got a nodelist of objects returned by a call to document.getElementsByClassName('a'). Some of these objects have an extra class b. How can I create an array of elements that contain both classes?...

View Article


Unexpected token ';' in a random generator when trying to use if else to...

I've been fiddling with programming from time to time for few years and have decided to give it a proper go with some simple, personal projects. I'm trying to make a randomizer for a pen and paper RPG...

View Article

React Router not recognizing route, redirects me to blank screen

I am using react router v4, and I register a route and try and make a link to it, but when I click the link or type it in manually it doesn't seem to register the contents and doesn't even recognize...

View Article

Image may be NSFW.
Clik here to view.

How to use PFTron WebViewer on my Electron app?

I want to use PDFTron webviewer on my app. How I do it? "NOTE: I installed @pdftron node module"

View Article
Browsing all 139805 articles
Browse latest View live